[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/31970] New: [x86_64] ld testsuite: mark-plt-* tests fail when ta
From: |
awilfox at adelielinux dot org |
Subject: |
[Bug ld/31970] New: [x86_64] ld testsuite: mark-plt-* tests fail when targeting musl |
Date: |
Wed, 10 Jul 2024 20:44:23 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=31970
Bug ID: 31970
Summary: [x86_64] ld testsuite: mark-plt-* tests fail when
targeting musl
Product: binutils
Version: 2.42
Status: UNCONFIRMED
Keywords: testsuite
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: awilfox at adelielinux dot org
Target Milestone: ---
Target: x86_64-*-linux-musl
Created attachment 15613
--> https://sourceware.org/bugzilla/attachment.cgi?id=15613&action=edit
Full ld.log from test run
Using:
GNU ld (GNU Binutils) 2.42
gcc (Adelie 13.3.0) 13.3.0
on:
Linux lab-x86_64-lin-2.tpcl.atwilcox.tech 5.15.132-mc6-easy #1 SMP Sun Nov 12
04:16:02 UTC 2023 x86_64 GNU/Linux
Architecture: x86_64
CPU(s): 8
Vendor ID: GenuineIntel
Model name: Intel(R) Core(TM) i7-6700T CPU @ 2.80GHz
I am seeing all mark-plt tests fail on x86_64/musl:
Running
/home/awilcox/Code/packages/system/binutils/src/binutils-2.42/ld/testsuite/ld-x86-64/x86-64.exp
...
FAIL: ld-x86-64/mark-plt-1a
FAIL: ld-x86-64/mark-plt-1b
FAIL: ld-x86-64/mark-plt-1c
FAIL: ld-x86-64/mark-plt-1d
FAIL: ld-x86-64/mark-plt-1a-x32
FAIL: ld-x86-64/mark-plt-1b-x32
FAIL: ld-x86-64/mark-plt-1c-x32
FAIL: ld-x86-64/mark-plt-1d-x32
FAIL: Build mark-plt-1.so
When I try to reproduce the mark-plt-1a test from the test suite, I see:
awilcox on lab-x86_64-lin-2
~/Code/packages/system/binutils/src/binutils-2.42/ld % ./ld-new -z norelro
-L/home/awilcox/Code/packages/system/binutils/src/binutils-2.42/ld/testsuite/ld-x86-64
-melf_x86_64 -shared -z mark-plt -o tmpdir/dump tmpdir/mark-plt-1.o
awilcox on lab-x86_64-lin-2
~/Code/packages/system/binutils/src/binutils-2.42/ld % ../binutils/readelf
-drW tmpdir/dump
Dynamic section at offset 0x288 contains 13 entries:
Tag Type Name/Value
0x000000006ffffef5 (GNU_HASH) 0x190
0x0000000000000005 (STRTAB) 0x200
0x0000000000000006 (SYMTAB) 0x1b8
0x000000000000000a (STRSZ) 9 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000070000000 (DT_X86_64_PLT) 0x230
0x0000000070000001 (DT_X86_64_PLTSZ) 0x20
0x0000000070000003 (DT_X86_64_PLTENT) 0x10
0x0000000000000003 (PLTGOT) 0x13a8
0x0000000000000002 (PLTRELSZ) 24 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x210
0x0000000000000000 (NULL) 0x0
Relocation section '.rela.plt' at offset 0x210 contains 1 entry:
Offset Info Type Symbol's Value
Symbol's Name + Addend
00000000000013c0 0000000100000007 R_X86_64_JUMP_SLOT 0000000000000000 bar
+ 240
While we were expecting:
% cat testsuite/ld-x86-64/mark-plt-1a.d
#source: mark-plt-1.s
#as: --64
#ld: -melf_x86_64 -shared -z mark-plt
#readelf: -drW
#...
0x0000000070000000 \(DT_X86_64_PLT\) 0x1000
0x0000000070000001 \(DT_X86_64_PLTSZ\) 0x20
0x0000000070000003 \(DT_X86_64_PLTENT\) 0x10
#...
[0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +bar \+ 1010
#pass
My theory is that this is because there is no glibc dep and therefore no
.gnu_version_r section:
% cat testsuite/ld-x86-64/mark-plt-1a.rd
#...
Version needs section '.gnu.version_r' contains 1 entry:
Addr: 0x[0-9a-f]+ +Offset: 0x[0-9a-f]+ +Link: +[0-9]+ +\(.dynstr\)
+0+: Version: 1 +File: libc\.so\.6(|\.1) +Cnt: +[0-9]+
#...
0x[a-f0-9]+: Name: GLIBC_2.36 Flags: none Version: [0-9]+
#pass
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/31970] New: [x86_64] ld testsuite: mark-plt-* tests fail when targeting musl,
awilfox at adelielinux dot org <=
- [Bug ld/31970] [x86_64] ld testsuite: mark-plt-* tests fail when targeting musl, hjl.tools at gmail dot com, 2024/07/10
- [Bug ld/31970] [x86_64] ld testsuite: mark-plt-* tests fail when targeting musl, awilfox at adelielinux dot org, 2024/07/10
- [Bug ld/31970] [x86_64] ld testsuite: mark-plt-* tests fail when targeting musl, cvs-commit at gcc dot gnu.org, 2024/07/10
- [Bug ld/31970] [x86_64] ld testsuite: mark-plt-* tests fail when targeting musl, hjl.tools at gmail dot com, 2024/07/10
- [Bug ld/31970] [x86_64] ld testsuite: mark-plt-* tests fail when targeting musl, cvs-commit at gcc dot gnu.org, 2024/07/14
- [Bug ld/31970] [x86_64] ld testsuite: mark-plt-* tests fail when targeting musl, sam at gentoo dot org, 2024/07/14