diff options
author | Ovidiu Panait <ovidiu.panait@windriver.com> | 2021-07-21 22:31:07 +0300 |
---|---|---|
committer | Ovidiu Panait <ovpanait@gmail.com> | 2021-08-04 12:31:15 +0300 |
commit | d2bb23badf3170c69f0377e7acc66fa0871bd435 (patch) | |
tree | 5367963ed02c023a7a7b80ff4efd2c1db56f2e4a /configure.ac | |
parent | 4d03718b170ac87d93799678ddaf1d226703845f (diff) | |
download | patchelf-d2bb23badf3170c69f0377e7acc66fa0871bd435.tar.gz |
tests: add testcase for alignment issues with contiguous note sections
Add a testcase for the following reported alignment issue with contiguous note
sections (#275):
"""
If a binary has multiple SHT_NOTE sections and corresponding PT_NOTE
headers, we can see the error:
patchelf: cannot normalize PT_NOTE segment: non-contiguous SHT_NOTE sections
if the SHT_NOTE sections aren't sized to end on aligned boundaries. An example
would be a binary with:
[ 2] .note.ABI-tag NOTE 00000000000002f4 000002f4
0000000000000020 0000000000000000 A 0 0 4
[ 3] .note.gnu.propert NOTE 0000000000000318 00000318
0000000000000030 0000000000000000 A 0 0 8
[ 4] .note.gnu.build-i NOTE 0000000000000348 00000348
0000000000000024 0000000000000000 A 0 0 4
NOTE 0x0000000000000318 0x0000000000000318 0x0000000000000318
0x0000000000000030 0x0000000000000030 R 0x8
NOTE 0x00000000000002f4 0x00000000000002f4 0x00000000000002f4
0x0000000000000078 0x0000000000000074 R 0x4
since the PT_NOTE section at 2f4 covers [2] and [3] but the code
calclates curr_off should be 314, not the 318 in the binary. This
is an alignment issue.
"""
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 3af271f..2d752d4 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,7 @@ AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror dist-bzip2 foreign color-tests parallel-t AM_PROG_CC_C_O AC_PROG_CXX +AM_PROG_AS DEFAULT_PAGESIZE=auto AC_ARG_WITH([page-size], |