[PATCH v4 03/10] RISC-V: Add path of library directories for the 32-bit
Joseph Myers
joseph@codesourcery.com
Mon Dec 10 22:09:00 GMT 2018
On Fri, 7 Dec 2018, DJ Delorie wrote:
> As much as I hate code duplication, I think we need separate macros for
> 64 and 32 bit targets, else the 32-bit linker will search 64-bit
> libraries and the 64-bit linker will search 32-bit libraries. While the
> linker should be smart enough to skip incompatible libraries, it's
> expensive to do so, and certainly "unexpected" from a developer's point
> of view.
This code is used in ldconfig, not in libc itself.
As soon as you support executing RV32I code under an RV64I kernel (what's
the status on that?), you need all the pieces described at
<https://sourceware.org/ml/libc-alpha/2018-01/msg00008.html> to be set up
appropriately for that, which includes a single definition of this macro
handling all the ABIs.
Until then, you only need those pieces set up for simultaneous support of
the two floating-point ABI variants. That's already done for the two
64-bit ABIs. But sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed looks
specific to 64-bit, and I don't see anything in this patch series that
makes it handle 32-bit (so that ldd on a 32-bit RISC-V system can handle
binaries for both 32-bit ABIs).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list