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
On some architectures (like mips64el, ppc64el and s390x), the output of objdump -p does not include the linker itself and thus the output of ldd.fakechroot which relies on objdump -p is wrong. For example on amd64, running ldd /bin/true yields:
This is the expected output. The last line is the absolute path to the linker. On some architectures, this does not work. Here is what ldd /bin/true shows on ppc64el:
Notice that the line saying /lib64/ld64.so.2 is missing. This breaks software like mkinitramfs which relies on the ldd output to determine which libraries to copy into the initramfs. With the linker missing, no binary from the created initramfs can be executed.
To fix this, I suggest adding the linker path recorded in the .interp section of the ELF format. This can be obtained by running objdump -sj .interp /bin/true which, for example on ppc64el prints:
/bin/true: file format elf64-powerpcle
Contents of section .interp:
0238 2f6c6962 36342f6c 6436342e 736f2e32 /lib64/ld64.so.2
0248 00
The field contains the correct linker path /lib64/ld64.so.2.
On some architectures (like mips64el, ppc64el and s390x), the output of
objdump -p
does not include the linker itself and thus the output ofldd.fakechroot
which relies onobjdump -p
is wrong. For example on amd64, runningldd /bin/true
yields:And running
ldd.fakechroot /bin/true
yields:This is the expected output. The last line is the absolute path to the linker. On some architectures, this does not work. Here is what
ldd /bin/true
shows on ppc64el:And this is what
ldd.fakechroot /bin/true
prints:Notice that the line saying
/lib64/ld64.so.2
is missing. This breaks software likemkinitramfs
which relies on theldd
output to determine which libraries to copy into the initramfs. With the linker missing, no binary from the created initramfs can be executed.To fix this, I suggest adding the linker path recorded in the
.interp
section of the ELF format. This can be obtained by runningobjdump -sj .interp /bin/true
which, for example on ppc64el prints:The field contains the correct linker path
/lib64/ld64.so.2
.I added a commit fixing
ldd.fakechroot
to #104.The text was updated successfully, but these errors were encountered: