-
-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rename-dynamic-symbols.sh fails during the compilation with "span access out of range" error #503
Comments
Hello, I have the same issue with Linux x86_64 since patchelf-0.18.0. File: tests/rename-dynamic-symbols.sh.log
Cause: |
@brenoguim Can you have a look at this issue and help ? |
I see the same issue when running
|
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.
I have created a pull request #547 with this change. |
I am compiling the patchelf 0.18.0 for s390x and getting these failure,
Compilation failure:
[ 70s] FAIL: rename-dynamic-symbols.sh
[ 70s] ===============================
[ 70s]
[ 70s] patching ELF file '/home/abuild/rpmbuild/BUILD/patchelf-0.18.0/tests/libmany-syms.so'
[ 70s] skip renaming dynamic symbol nskip renaming dynamic symbol nrenaming dynamic symbol __cxa_finalize to __cxa_finalize_special_suffix
[ 70s] renaming dynamic symbol _ITM_deregisterTMCloneTable to _ITM_deregisterTMCloneTable_special_suffix
[ 70s] renaming dynamic symbol gmon_start to __gmon_start___special_suffix
[ 70s] renaming dynamic symbol _ITM_registerTMCloneTable to _ITM_registerTMCloneTable_special_suffix
..
..
..
[ 70s] patchelf: error: Span access out of range.
[ 70s] FAIL rename-dynamic-symbols.sh (exit status: 1)
I suspect the test script for injecting out of range size.
Can you have a look at it ?
The text was updated successfully, but these errors were encountered: