You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests fail on PIC executables: maximum file size exceeded #47
Fedora Linux distribution started to build all executables as position-independent code.
patchelf fails selftest on such executables (see the 'maximum file size exceeded'):
$ ../src/patchelf --set-interpreter /oops scratch/set-interpreter-short/simple
warning: working around a Linux kernel bug by creating a hole of 18870272 bytes in ‘scratch/set-interpreter-short/simple’
maximum file size exceeded
The /usr/lib/rpm/redhat/redhat-hardened-ld contains:
*self_spec:
+ %{!shared:%{!r:-pie}}
*link:
+ -z now
Alternatively you can replace LDFLAGS with '-z now' and add '-pie' to LDFLAGS_local variable in tests/Makefile.am (and run autoreconf before ./configure).
The issue is that maxSize is set to fileSize + 8 MB, the output buffer is allocated to the maxSize, then a hole is detected. But the hole is bigger than 8 MB, thus the growFile() aborts.
Either the 8 MB constant should be raised to bigger arbitrary constant, or the output buffer and the maxSize should be enlarged by the hole, or the detected hole is bogus in case of PIE executables.
Activity
ppisar commentedon Jul 7, 2015
Here https://kojipkgs.fedoraproject.org//work/tasks/3043/10123043/build.log you can seen comple build log. It happens on amd64 as well on i686.
ppisar commentedon Jul 7, 2015
The issue is that maxSize is set to fileSize + 8 MB, the output buffer is allocated to the maxSize, then a hole is detected. But the hole is bigger than 8 MB, thus the growFile() aborts.
Either the 8 MB constant should be raised to bigger arbitrary constant, or the output buffer and the maxSize should be enlarged by the hole, or the detected hole is bogus in case of PIE executables.
Quick fix for #47
ppisar commentedon Jul 13, 2015
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9
patchelf: Update to version 0.9