[PATCH] thp: Limit THP code padding to 2 * THP page size

H.J. Lu hjl.tools@gmail.com
Tue Jun 23 04:51:10 GMT 2026


Since R_ARC_S25W_PCREL range is limited, 32MB THP code padding leads to
relocation overflow:

.../support/libsupport_nonshared.a(support_test_main.oS):
in function `support_test_main':
.../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
../glibc/libc_nonshared.a(atexit.oS)
.../install/compilers/arc-linux-gnu/arc-glibc-linux-gnu/bin/ld: final
link failed
collect2: error: ld returned 1 exit status

Limit THP code padding to 2 * THP page size to avoid R_ARC_S25W_PCREL
relocation overflow.

Tested natively for Linux/x86-64 and Linux/i686 as well as with
build-many-glibcs.py for arc-linux-gnu.

This fixes BZ #34311


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-thp-Limit-THP-code-padding-to-2-THP-page-size.patch
Type: text/x-patch
Size: 3987 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260623/d66b2aa7/attachment.bin>


More information about the Libc-alpha mailing list