Merge branch '0.15-maintenance' into 0.16-maintenance

This commit is contained in:
John Ericson
2025-08-12 22:42:54 -04:00
4 changed files with 1167 additions and 118 deletions

View File

@@ -1,4 +1,4 @@
## Release History
# Release History
## 0.16.1 (October 28, 2022)
@@ -13,7 +13,13 @@ Originally, 0.16.0 would have freshly contained all items from both releases.
* Sync `.note.gnu.property` to `PT_GNU_PROPERTY` by @Bo98 in https://github.com/NixOS/patchelf/pull/414
* Rework file shifting to avoid sections crossing multiple segments by @Bo98 in https://github.com/NixOS/patchelf/pull/415
## 0.15.3 (yet to be released)
## 0.15.4 (August 12, 2025)
* Update to a later glibc `elf.h`.
This should not result in any behavioral changes, except for possibly better architecture-specific support.
## 0.15.3 (August 12, 2025)
This is a backport release made from the simplest fixes from 0.16.0.

1245
src/elf.h

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
#! /bin/sh -u
#! /bin/sh -ue
# Usage: killed_by_signal $?
#
@@ -18,6 +18,24 @@ TEST_DIR=$(dirname "$(readlink -f "$0")")/invalid-elf
TEST_CASES="invalid-shrstrtab-idx invalid-shrstrtab-size invalid-shrstrtab-zero
invalid-shrstrtab-nonterm invalid-shdr-name invalid-phdr-offset"
# Issue #64 regression test. Test ELF provided by issue submitter.
TEST_CASES=$TEST_CASES' invalid-phdr-issue-64'
# shellcheck disable=SC2034
invalid_shrstrtab_idx_MSG='data region extends past file end'
# shellcheck disable=SC2034
invalid_shrstrtab_size_MSG='data region extends past file end'
# shellcheck disable=SC2034
invalid_shrstrtab_zero_MSG='data region extends past file end'
# shellcheck disable=SC2034
invalid_shrstrtab_nonterm_MSG='data region extends past file end'
# shellcheck disable=SC2034
invalid_shdr_name_MSG='data region extends past file end'
# shellcheck disable=SC2034
invalid_phdr_offset_MSG='data region extends past file end'
# shellcheck disable=SC2034
invalid_phdr_issue_64_MSG='program header table out of bounds'
FAILED_TESTS=""
for tcase in $TEST_CASES; do
@@ -26,10 +44,16 @@ for tcase in $TEST_CASES; do
exit 1
fi
../src/patchelf --output /dev/null "$TEST_DIR/$tcase"
if killed_by_signal $?; then
../src/patchelf --output /dev/null "$TEST_DIR/$tcase" && res=$? || res=$?
if killed_by_signal "$res"; then
FAILED_TESTS="$FAILED_TESTS $tcase"
fi
var=$(echo "$tcase-MSG" | tr '-' '_')
msg=
eval "msg=\${$var}"
../src/patchelf --output /dev/null "$TEST_DIR/$tcase" 2>&1 |
grep "$msg" >/dev/null 2>/dev/null
done
if [ -z "$FAILED_TESTS" ]; then

Binary file not shown.