#992969 fix_ldscript doesn't fix the path to the ld-linux.so file

Package:
dpkg-cross
Source:
dpkg-cross
Submitter:
Matthias Klose
Date:
2021-08-28 06:21:05 UTC
Severity:
important
Tags:
#992969#5
Date:
2021-08-25 18:17:25 UTC
From:
To:
seen when trying to convert every non-default 32bit multilib libc-dev-* package.

$ cat /usr/powerpc64-linux-gnu/lib32/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-powerpc)
GROUP ( /usr/powerpc64-linux-gnu/lib32/libc.so.6
/usr/powerpc64-linux-gnu/lib32/libc_nonshared.a  AS_NEEDED (
/usr/powerpc64-linux-gnu/lib/ld.so.1 ) )


$ cat /usr/x86_64-linux-gnux32/lib32/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /usr/x86_64-linux-gnux32/lib32/libc.so.6
/usr/x86_64-linux-gnux32/lib32/libc_nonshared.a  AS_NEEDED (
/usr/x86_64-linux-gnux32/lib/ld-linux.so.2 ) )


while the paths to the shared and static libc libs is correctly converted, the
path to the ld-linux.so.2 points to the default (64bit) ld-linux.so.

working around this in the cross-toolchain-base packages.

#992969#10
Date:
2021-08-28 06:16:44 UTC
From:
To:
Hi Matthias,

I fear that I don't fully understand the issue you are having here. Can
you elaborate?

/usr/powerpc64-linux-gnu/lib/ld.so.1 is the powerpc linker and is shipped
in libc6-powerpc-ppc64-cross with that path.

/usr/x86_64-linux-gnux32/lib/ld-linux.so.2 is the i386 linker and is
shipped in libc6-i386-x32-cross with that path.

The default 64bit ld-linux.so would be
/usr/powerpc64-linux-gnu/lib/ld64.so.1 for the ppc64el case and for the
x32 example I think you mean the x32 linker, which would be
/usr/x86_64-linux-gnux32/lib/ld-linux-x32.so.2, but if you really do
mean 64bit here, it would end in ld-linux-x86-64.so.2 in any case. None
of them would look like the supposedly unconverted paths.

I am unsure what problem you are working around here. What breaks if you
drop it?

Helmut