Summary: | sys-libs/glibc-2.11.2: TEXTRELs on SuperH when building PIEs (due to Scrt1.o) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | SpanKY <vapier> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | armin76, slyfox |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | sh | ||
OS: | Linux | ||
URL: | https://sourceware.org/PR23441 | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=459784 | ||
Whiteboard: | tracking upstream | ||
Package list: | Runtime testing required: | --- |
Description
SpanKY
2010-09-09 19:33:33 UTC
Still happens: $ echo 'int main(){}' | sh4-unknown-linux-gnu-gcc-8.1.0 -fPIE -pie -x c - -o a.out /usr/libexec/gcc/sh4-unknown-linux-gnu/ld: warning: creating a DT_TEXTREL in object. Very similar dynamic relocations: $ objdump -d -R a.out | fgrep -C30 R_SH_ 000003f8 <_start>: 3f8: 00 ee mov #0,r14 3fa: f6 65 mov.l @r15+,r5 3fc: f3 66 mov r15,r6 3fe: 46 2f mov.l r4,@-r15 400: 06 d0 mov.l 41c <_start+0x24>,r0 ! 5cc <__libc_csu_fini> 402: 06 2f mov.l r0,@-r15 404: 03 d4 mov.l 414 <_start+0x1c>,r4 ! 54c <main> 406: 04 d7 mov.l 418 <_start+0x20>,r7 ! 564 <__libc_csu_init> 408: 05 d1 mov.l 420 <_start+0x28>,r1 ! 0 40a: 0b 41 jsr @r1 40c: 09 00 nop 40e: 05 d1 mov.l 424 <_start+0x2c>,r1 ! 0 410: 0b 41 jsr @r1 412: 09 00 nop 414: 4c 05 mov.b @(r0,r4),r5 414: R_SH_RELATIVE *ABS*+0x54c 416: 00 00 .word 0x0000 418: 64 05 mov.b r6,@(r0,r5) 418: R_SH_RELATIVE *ABS*+0x564 41a: 00 00 .word 0x0000 41c: cc 05 mov.b @(r0,r12),r5 41c: R_SH_RELATIVE *ABS*+0x5cc ... 420: R_SH_DIR32 __libc_start_main@GLIBC_2.2 424: R_SH_DIR32 abort@GLIBC_2.2 Filed bug upstream with a few details: https://sourceware.org/PR23441 TL;DR: start.S (and some other sysdeps/sh) assembly code does not attempt to use PIC code and hardcodes absolute addresses to external symbols. Should use GOT/PLT instead. SuperH port disbanded. |