| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
CI for aarch64
|
|/ |
|
|\
| |
| | |
Improve the default section alignment choice (> 4K page size compat)
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently patchelf uses the host system's page size (determined at build
time) as the default section load memory alignment. This causes multiple
issues
- Cross-compilation: when using patchelf on ELFs targetting a different
architecture from the host, the host page size is still used by
default.
- Variable page size architectures: ARMv8 systems can be configured in
either 4K, 16K, or 64K page size mode depending on kernel
configuration. An ARMv8 patchelf built on a 4K page size system will
end up creating ELFs that cannot be used on a 64K page size system.
- Reproducibility: the page size of the machine that built patchelf
"leaks" into the binary.
The build time --with-page-size as well as the run time --page-size
options can be used to work around some of these issues. But it's much
better to have patchelf do the right thing without explicit
configuration.
This commit adds support for inferring page size from the ELF header's
"machine" field. The default values are extracted from GNU gold's source
code. Note that both --with-page-size as well as --page-size continue to
work and take precedence on the default value.
|
|\
| |
| | |
Some const-correctness and C++11 auto
|
| |
| |
| |
| | |
(cherry picked from commit 76e2cdbee4705c45cae4eca55278530a02be2f83)
|
|\ \
| | |
| | | |
Fixed parallel execution of tests (parallel-tests in automake)
|
| | | |
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Add libasan build option and test print-needed
|
|/ /
| |
| |
| | |
(cherry picked from commit 288eb61a173ce6f4cdf0be0d744c9c6b6b5598a4)
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
tests: Do not exit on an expected failure code.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The comment in the code below the patched line
clearly suggests that it should go on in this case.
This condition occurs on Alpine Linux (musl-libc-based):
http://patchwork.alpinelinux.org/patch/2206/
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Remove zeroing out logic in modifySoname
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The original SONAME is filled with 'X' characters in the modifySoname
function. This can cause issues if the .dynstr entry is still referenced
in other sections, e.g. some libraries use the SONAME entry as version
specifiers.
|
|\ \ \ \
| | | | |
| | | | | |
Fix shared library corruption when rerunning patchelf
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When running patchelf on some existing patchelf'd binaries to change to longer
RPATHS, ldd would report the binaries as invalid. The output of objdump -x on
those libraryies should show the top of the .dynamic section is getting trashed,
something like:
0x600000001 0x0000000000429000
0x335000 0x0000000000335000
0xc740 0x000000000000c740
0x1000 0x0000000000009098
SONAME libglib-2.0.so.0
(which should be RPATH and DT_NEEDED entries)
This was tracked down to the code which injects the PT_LOAD section.
The issue is that if the program headers were previously relocated to the end
of the file which was how patchelf operated previously, the relocation code
wouldn't work properly on a second run as it now assumes they're located after
the elf header. This change forces them back to immediately follow the elf
header which is where the code has made space for them.
Should fix https://github.com/NixOS/patchelf/issues/170
and https://github.com/NixOS/patchelf/issues/192
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|\ \ \ \ \
| | | | | |
| | | | | | |
github actions -> travis
|
| | | | | | |
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
fix adjusting startPage
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
startPage is adjusted unconditionally for all executables.
This results in incorrect addresses assigned to INTERP and LOAD
program headers, which breaks patched executable.
Adjusting startPage variable only when startOffset > startPage
should fix this.
This change is related to the issue NixOS#10
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
fix README -> README.me in some more places
|
| | |/ / / /
| |/| | | | |
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Consistently use --force-rpath
|
|/ / / / / |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Added --output flag
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Update Makefile.am
|
|/ / / / / |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Flake input changes:
* Added 'nixpkgs': 'github:NixOS/nixpkgs/48723f48ab92381f0afd50143f38e45cf3080405'
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Update doc to describe multiple filename args allowed
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Commit 936bae418b77ee9e06a93cd3cd444f4204446973 added support to handle
several files at once, but forgot to update the man and help output to
describe it.
Fixes: 936bae418b77ee9e06a93cd3cd444f4204446973
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Also update the lock file.
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add .travis.yml to enable CI
|
|/ / / / / |
|
| | | | | |
|
| | | | | |
|