[Bug build/34311] New: elf/tst-thp-1 failed to link
"hjl.tools at gmail dot com via Glibc-bugs" <[email protected]> Mon, 22 Jun 2026 22:30:52 +0000
| Newsgroups | gmane.comp.lib.glibc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://sourceware.org/bugzilla/show_bug.cgi?id=34311
Bug ID: 34311
Summary: elf/tst-thp-1 failed to link
Product: glibc
Version: 2.44
Status: NEW
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
CC: carlos at redhat dot com
Target Milestone: ---
Target: arc
One of the new tests fails to link for ARC:
https://sourceware.org/pipermail/libc-testresults/2026q2/014752.html
/notnfs/josmyers/glibc-bot/build/glibcs/arc-linux-gnu/glibc/support/libsupport_nonshared.a(support_test_main.oS):
in function `support_test_main':
/notnfs/josmyers/glibc-bot/src/glibc/support/support_test_main.c:396:(.text+0x650):
relocation truncated to fit: R_ARC_S25W_PCREL_PLT against symbol `atexit'
defined in .text section in
/notnfs/josmyers/glibc-bot/build/glibcs/arc-linux-gnu/glibc/libc_nonshared.a(atexit.oS)
/notnfs/josmyers/glibc-bot/install/compilers/arc-linux-gnu/arc-glibc-linux-gnu/bin/ld:
final link failed
collect2: error: ld returned 1 exit status
make[3]: *** [../Rules:261:
/notnfs/josmyers/glibc-bot/build/glibcs/arc-linux-gnu/glibc/elf/tst-thp-1]
Error 1
Since R_ARC_S25W_PCREL range is very limited:
[hjl@gnu-zen4-1 tmp]$ cat x.c
#include <stdlib.h>
void
foo (void)
{
}
int
main ()
{
atexit (foo);
return 0;
}
[hjl@gnu-zen4-1 tmp]$ cat big.S
#ifndef N
#define N 16
#endif
.text
.space N * 1024 * 1024
[hjl@gnu-zen4-1 tmp]$
/export/build/gnu/tools-build/glibc-many/install/compilers/arc-linux-gnu/bin/arc-glibc-linux-gnu-gcc
x.c big.S
/tmp/ccp5O4FS.o: in function `main':
x.c:(.text+0x1e): relocation truncated to fit: R_ARC_S25W_PCREL against symbol
`atexit' defined in .text section in
/export/build/gnu/tools-build/glibc-many/install/compilers/arc-linux-gnu/sysroot/usr/lib/libc_nonshared.a(atexit.oS)
/export/build/gnu/tools-build/glibc-many/install/compilers/arc-linux-gnu/arc-glibc-linux-gnu/bin/ld:
final link failed
collect2: error: ld returned 1 exit status
[hjl@gnu-zen4-1 tmp]$
/export/build/gnu/tools-build/glibc-many/install/compilers/arc-linux-gnu/bin/arc-glibc-linux-gnu-gcc
x.c big.S -DN=15
[hjl@gnu-zen4-1 tmp]$
all THP tests linked with elf/tst-thp-size-mod.o:
[hjl@gnu-zen4-1 tmp]$ readelf -SW
/export/build/gnu/tools-build/glibc-many/build/glibcs/arc-linux-gnu/glibc/elf/tst-thp-size-mod.o
There are 9 section headers, starting at offset 0x200011c:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf
Al
[ 0] NULL 00000000 000000 000000 00 0 0
0
[ 1] .text PROGBITS 00000000 000034 2000000 00 AX 0 0
1
[ 2] .data PROGBITS 00000000 2000034 000000 00 WA 0 0
1
[ 3] .bss NOBITS 00000000 2000034 000000 00 WA 0 0
1
[ 4] .note.GNU-stack NOTE 00000000 2000034 000000 00 0 0
1
[ 5] .ARC.attributes ARC_ATTRIBUTES 00000000 2000034 00001f 00 0 0
1
[ 6] .symtab SYMTAB 00000000 2000054 000070 10 7 6
4
[ 7] .strtab STRTAB 00000000 20000c4 00000a 00 0 0
1
[ 8] .shstrtab STRTAB 00000000 20000ce 00004c 00 0 0
1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
D (mbind), p (processor specific)
[hjl@gnu-zen4-1 tmp]$
fail to link due to R_ARC_S25W_PCREL overflow.
--
You are receiving this mail because:
You are on the CC list for the bug.