This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4 03/10] RISC-V: Add path of library directories for the 32-bit
- From: Joseph Myers <joseph at codesourcery dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: Zong Li <zongbox at gmail dot com>, <palmer at dabbelt dot com>, <darius at bluespec dot com>, <andrew at sifive dot com>, <libc-alpha at sourceware dot org>, <zong at andestech dot com>
- Date: Mon, 10 Dec 2018 22:02:00 +0000
- Subject: Re: [PATCH v4 03/10] RISC-V: Add path of library directories for the 32-bit
- References: <xnbm5xouag.fsf@greed.delorie.com>
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