diff mbox series

[v3,17/19] RISC-V: Add rv32 path to RTLDLIST in ldd

Message ID 3b9e6dd8baa53076ea5019f1e18d770ea47b58bb.1594568655.git.alistair.francis@wdc.com
State New
Headers show
Series glibc port for 32-bit RISC-V (RV32) | expand

Commit Message

Alistair Francis July 12, 2020, 3:48 p.m. UTC
From: Zong Li <zong.li@sifive.com>

---
 sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maciej W. Rozycki July 15, 2020, 12:32 a.m. UTC | #1
On Sun, 12 Jul 2020, Alistair Francis via Libc-alpha wrote:

> diff --git a/sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed
> index 377a9c6ef4..bc0c4f51a1 100644
> --- a/sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed
> +++ b/sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed
> @@ -1 +1 @@
> -s_^\(RTLDLIST=\)\(.*lib/\)\(ld-linux\)-\(riscv64\)-\(lp64\)\(d*\)\(\.so\.[0-9.]*\)_\1"\2\3-\4-\5\7 \2\3-\4-\5d\7"_
> +s_^\(RTLDLIST=\)\(.*lib\)\(/[^/]*\)\(64\|32\)\(-.*\)\(lp\)\(64\|32\)\(d*\)\(\.so\.[0-9.]*\)[  	]*$_\1"\2\364-\664\9 \2\364-\664\8\9 \2\332-i\632\9 \2\332-i\632\8\9"_

 This doesn't seem right to me.  Currently the list produced is as 
follows:

RTLDLIST="/lib/ld-linux-riscv64-lp64.so.1 /lib/ld-linux-riscv64-lp64d.so.1"

regardless of whether the ABI configured for has been lp64 or lp64d.  With 
this change in place the list becomes ABI specific and is:

RTLDLIST="/lib/ld-linux-riscv64-lp64.so.1 /lib/ld-linux-riscv64-lp64.so.1 /lib/ld-linux-riscv32-ilp32.so.1 /lib/ld-linux-riscv32-ilp32.so.1"

-- for the ilp32 or lp64 ABIs, and:

RTLDLIST="/lib/ld-linux-riscv64-lp64.so.1 /lib/ld-linux-riscv64-lp64d.so.1 /lib/ld-linux-riscv32-ilp32.so.1 /lib/ld-linux-riscv32-ilp32d.so.1"

-- for the ilp32d or lp64d ABIs.  Please look into it.

  Maciej
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed
index 377a9c6ef4..bc0c4f51a1 100644
--- a/sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed
+++ b/sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed
@@ -1 +1 @@ 
-s_^\(RTLDLIST=\)\(.*lib/\)\(ld-linux\)-\(riscv64\)-\(lp64\)\(d*\)\(\.so\.[0-9.]*\)_\1"\2\3-\4-\5\7 \2\3-\4-\5d\7"_
+s_^\(RTLDLIST=\)\(.*lib\)\(/[^/]*\)\(64\|32\)\(-.*\)\(lp\)\(64\|32\)\(d*\)\(\.so\.[0-9.]*\)[  	]*$_\1"\2\364-\664\9 \2\364-\664\8\9 \2\332-i\632\9 \2\332-i\632\8\9"_