https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465

--- Comment #36 from Sergei Trofimovich <slyfox at inbox dot ru> ---
Tested the patch on top of gcc-5.3.0 / glibc-2.22-r1.

Relocation in rtld.os is R_IA64_GPREL64I and is just an immediate offset in
ld.so:

# objdump -r -d elf/rtld.os | grep -C4 rtld_local+0x38
    97c0:       11 00 00 00 01 00       [MIB]       nop.m 0x0
    97c6:       00 00 00 02 80 03                   nop.i 0x0
    97cc:       10 01 00 43                   (p07) br.cond.dpnt.few 98d0
<_dl_start+0x210>;;
    97d0:       04 90 00 4d 00 21       [MLX]       adds r18=64,r38
                        97d1: GPREL64I  _rtld_local+0x3800003e0
    97d6:       00 00 00 00 00 40                   movl r26=0x0
    97dc:       03 00 00 60 
    97e0:       05 b0 40 4d 02 21       [MLX]       adds r22=336,r38
                        97e1: GPREL64I  _rtld_local+0x37ffffb80

# objdump -r -d elf/ld.so | grep -C8 '_dl_start+0x210'

    b200:       11 00 00 00 01 00       [MIB]       nop.m 0x0
    b206:       00 00 00 02 80 03                   nop.i 0x0
    b20c:       10 01 00 43                   (p07) br.cond.dpnt.few b310
<_dl_start+0x210>;;
    b210:       04 90 00 4d 00 21       [MLX]       adds r18=64,r38
    b216:       80 03 00 00 00 40                   movl r26=0x380029110
    b21c:       03 41 88 64 
    b220:       05 b0 40 4d 02 21       [MLX]       adds r22=336,r38
    b226:       80 03 00 00 00 00                   movl r24=0x3800288b0;;

Sent for review as:
https://gcc.gnu.org/ml/gcc-patches/2015-12/msg02193.html

Reply via email to