William Tassoux
b219056071
Fix support for files larger than 4GB
2025-02-06 03:58:04 +01:00
Jörg Thalheim
739a486ece
add mergify configuration
2025-01-08 17:59:31 +01:00
Jörg Thalheim
cb520395c1
Revert "Add riscv64
support for flake.nix"
...
This reverts commit f163e8df3d
.
We don't support riscv64 in hydra. This needs to be refactored to only
enable riscv64 in the flake but not in hydra jobs.
2025-01-08 17:56:27 +01:00
Patryk Wychowaniec
43b75fbc9f
Allocate PHT & SHT at the end of the *.elf file
2025-01-07 07:29:30 +01:00
Jörg Thalheim
769337c227
fix shellcheck
2024-11-18 12:44:49 +01:00
Michal Biesek
f163e8df3d
Add riscv64
support for flake.nix
2024-11-18 12:01:54 +01:00
Yuta Hayama
5017be7ae0
Add test to set interpreter of same name
2024-11-18 11:57:58 +01:00
Yuta Hayama
0a64a88208
Set interpreter only when necessary
...
If the given interpreter is already set, nothing needs to be done.
As with modifySoname(), it skips unnecessary processing.
2024-11-18 11:57:58 +01:00
dependabot[bot]
fd9c6ded20
Bump actions/checkout from 3 to 4
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-11-18 11:56:58 +01:00
Pablo Galindo
0e338941fc
Fix alignment problem when rewriting sections
...
After commit ac212d0e6f
the code to
rewrite alignment section has been changed to use the largest alignment
in the list of segments instead of the alignment that it's retrieved
using getPageSize().
Unfortunately the code didn't update the offset as well to keep the
invariant p_vaddr % alignment == p_offset % alignment.
2024-11-18 11:54:42 +01:00
Jörg Thalheim
d985189c25
partially revert "Fix page size on Alpha"
...
this broke tests on other architectures
2024-11-18 11:46:09 +01:00
Jörg Thalheim
7cd6f031c0
use more portable command -v to test if gzip exists
...
This also works with the busybox version.
2024-11-18 11:46:09 +01:00
Patryk Wychowaniec
065c8484e3
tests: Check uname before gzip
2024-11-18 11:46:09 +01:00
Jörg Thalheim
8a88cc8684
fixup ci with new upload-artifact version
2024-11-18 11:46:09 +01:00
dependabot[bot]
38c720faf8
Bump actions/download-artifact from 3 to 4
...
Bumps [actions/download-artifact](https://github.com/actions/download-artifact ) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases )
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4 )
2024-11-18 11:46:09 +01:00
dependabot[bot]
47ee15f2a4
Bump actions/upload-artifact from 3 to 4
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-11-18 11:46:09 +01:00
Klemens Nanni
1ded8392b1
tests/short-first-segment: fix uname(1) usage and skip message
...
Replace non-portable GNU `-i, --hardware-platform` with `-m[, --machine]`
to fix "unknown error" usage error on, e.g. OpenBSD.
Also fix the check's backwards logic. OpenBSD/spar64 now prints
-skipping test: not supported on x86_64 Linux
+skipping test: amd64 Linux required
2024-11-18 11:08:47 +01:00
Klemens Nanni
27e4d7af87
Restrict system operations on OpenBSD
...
Use pledge(2)[0] to limit patchelf(1) to read, write and create files.
It never deals with TTY, network, process management or other subsystems.
Do so immediately in main() since mainWrapped() itself parses files
whilst parsing command line arguments (--rename-dynamic-symbols).
This is to reduce patchelf's attack surface and potential damage when
dealing with untrusted ELF programs.
No behaviour change in tests or real world usage observed on
OpenBSD/amd64 7.4 (0.18.0 tests: 56/52/2/2 TOTAL/PASS/FAIL/SKIP).
0: https://man.openbsd.org/pledge.2
2024-11-18 11:07:59 +01:00
matoro
1c443aa1c7
Fix page size on Alpha
...
All tests pass.
Also explicitly specifies -no-pie for executables which should have it
disabled, to be compatible with gccs built with --enable-default-pie.
2024-11-18 11:07:31 +01:00
Michal Biesek
ace831cc97
elf.h: Update RISC-V
relocations
...
glibc: commit: 6f962278e24bdf5cb5f310c5a17add41da95407c
Signed-off-by: Michal Biesek <michalbiesek@gmail.com >
2024-11-18 11:06:42 +01:00
RocketDev
b9976d63c2
switch to zsh grammar
2024-11-18 11:05:37 +01:00
RocketDev
513630db29
correct patchelf argument completions
2024-11-18 11:05:37 +01:00
RocketDev
4a6e1fde22
enhance --replace-needed
and --remove-needed
2024-11-18 11:05:37 +01:00
RocketDev
1bd68c54cc
fix zsh completion
2024-11-18 11:05:37 +01:00
Martin Jambor
b6cf11a31b
Fix rename-dynamic-symbols.sh test (issue #503 )
...
when building and then checking patchelf on openSUSE Leap 15.5, the
rename-dynamic-symbols.sh test fails. The test builds a test library
and executable called many-syms-main, then runs patchelf to rename
symbols and then checks that many-syms-main still runs successfully.
On Leap the run fails with many messages like
./many-syms-main: Symbol `f1947' causes overflow in R_X86_64_PC32 relocation
and then terminates with a Segmentation fault. The interesting bit is
that it however fails so even before patchelf touches it.
The binary is built and linked with option -pie which produces an
executable which is supposedly position independent but does not
actually contain code position independent code which requires
compiler option -fPIE (of -fpie or -fPIC or -fpic). As a result the
calls in the generated assembly do not go through the PLT.
This patch merely adresses that by adding the -fPIE option to the
CFLAGS for the test.
2024-11-18 11:05:01 +01:00
dependabot[bot]
835f8207c2
Bump cachix/install-nix-action from V27 to 30
...
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action ) from V27 to 30. This release includes the previously tagged commit.
- [Release notes](https://github.com/cachix/install-nix-action/releases )
- [Commits](https://github.com/cachix/install-nix-action/compare/V27...v30 )
---
updated-dependencies:
- dependency-name: cachix/install-nix-action
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-11-18 11:04:16 +01:00
Jörg Thalheim
7a471a6fc1
set docker platform for cross-arch builds
2024-11-18 10:57:40 +01:00
Jörg Thalheim
cbc46af556
make shebang in configure portable again
2024-11-18 10:57:40 +01:00
Jörg Thalheim
f0a21807d6
update flake
2024-11-18 10:57:40 +01:00
dependabot[bot]
2745e244f5
Bump cachix/install-nix-action from 25 to 27
...
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action ) from 25 to 27.
- [Release notes](https://github.com/cachix/install-nix-action/releases )
- [Commits](https://github.com/cachix/install-nix-action/compare/v25...V27 )
---
updated-dependencies:
- dependency-name: cachix/install-nix-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-11-17 20:21:49 +01:00
Rosen Penev
a0f54334df
fix compilation with GCC7
...
CTAD is not working here.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-06-15 15:17:28 +02:00
dependabot[bot]
7c2f768bf9
Bump cachix/install-nix-action from 22 to 25
...
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action ) from 22 to 25.
- [Release notes](https://github.com/cachix/install-nix-action/releases )
- [Commits](https://github.com/cachix/install-nix-action/compare/v22...v25 )
---
updated-dependencies:
- dependency-name: cachix/install-nix-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-15 10:51:22 +01:00
K900
917ea45b79
feat: add --no-clobber-old-sections switch
...
Works around #520 , may be useful for other cursed self-modifying things.
2023-09-27 08:55:02 +01:00
Jörg Thalheim
afd3cc9445
Merge pull request #519 from NixOS/dependabot/github_actions/docker/setup-qemu-action-3
...
Bump docker/setup-qemu-action from 2 to 3
2023-09-19 07:49:02 +02:00
dependabot[bot]
551a692076
Bump docker/setup-qemu-action from 2 to 3
...
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action ) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases )
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-09-18 01:44:39 +00:00
Domen Kožar
c40128936f
Merge pull request #502 from NixOS/dependabot/github_actions/cachix/install-nix-action-22
...
Bump cachix/install-nix-action from 20 to 22
2023-07-20 08:59:23 +01:00
dependabot[bot]
ea30aba6fc
Bump cachix/install-nix-action from 20 to 22
...
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action ) from 20 to 22.
- [Release notes](https://github.com/cachix/install-nix-action/releases )
- [Commits](https://github.com/cachix/install-nix-action/compare/v20...v22 )
---
updated-dependencies:
- dependency-name: cachix/install-nix-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-06-19 01:58:35 +00:00
bors[bot]
519766900c
Merge #501
...
501: COPYING: change http to https r=Mic92 a=mtelka
Co-authored-by: Marcel Telka <marcel@telka.sk >
2023-06-08 10:11:21 +00:00
Marcel Telka
30da44915e
COPYING: change http to https
2023-06-07 23:02:42 +02:00
bors[bot]
442793d9ec
Merge #499
...
499: Update elf.h based on Glibc r=Mic92 a=loongson-zn
Co-authored-by: Zhang Na <zhangna@loongson.cn >
2023-06-02 07:58:56 +00:00
Zhang Na
be8393c4c8
Update elf.h based on Glibc
2023-06-02 15:50:00 +08:00
bors[bot]
008a582741
Merge #493
...
493: Respect prefixed tools used with the tests when cross-compiling r=Mic92 a=heirecka
Co-authored-by: Heiko Becker <heirecka@exherbo.org >
2023-04-25 10:16:35 +00:00
Heiko Becker
1ab6930d15
Also respect a prefixed nm and strings too
2023-04-24 22:44:12 +02:00
Heiko Becker
d0c418fe38
Respect a possibly prefixed readelf
...
...i case of cross-compiling. Already done for other tests with
07bbf47e9c
.
2023-04-24 22:42:59 +02:00
bors[bot]
99c2423898
Merge #491
...
491: tests: use proper exit code to mark tests as skipped r=Mic92 a=Mic92
Co-authored-by: Jörg Thalheim <joerg@thalheim.io >
0.18.0
2023-04-23 11:31:12 +00:00
Jörg Thalheim
e8909d11da
bump version
2023-04-23 13:30:30 +02:00
Jörg Thalheim
acee2a4bb4
tests: use proper exit code to mark tests as skipped
2023-04-23 13:29:37 +02:00
bors[bot]
98591a5ae5
Merge #485
...
485: Resize segment mapping rewritten sections if needed #482 r=Mic92 a=brenoguim
Co-authored-by: Breno Rodrigues Guimaraes <brenorg@gmail.com >
2023-04-23 11:15:54 +00:00
Breno Rodrigues Guimaraes
65cdee9044
Resize segment mapping rewritten sections if needed
2023-04-23 13:13:07 +02:00
bors[bot]
6e7b82e839
Merge #481
...
481: Do not let modifyRPath taint shared strings in strtab. Fix #315 r=Mic92 a=brenoguim
Co-authored-by: Breno Rodrigues Guimaraes <brenorg@gmail.com >
2023-04-23 10:51:58 +00:00