bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/21132] [hppa-linux] pie support doesn't work


From: danglin at gcc dot gnu.org
Subject: [Bug ld/21132] [hppa-linux] pie support doesn't work
Date: Wed, 15 Feb 2017 04:29:09 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=21132

--- Comment #6 from John David Anglin <danglin at gcc dot gnu.org> ---
Looking further, I have concluded $global$ and %r19 are set correctly. The
relocations for

.Lpmain:
        .word P%main
.Lp__libc_start_main:
        .word P%__libc_start_main
.Lp__libc_csu_fini:
        .word P%__libc_csu_fini
.Lp__libc_csu_init:
        .word P%__libc_csu_init

are not correct.  The relocation for

.Lp__global:
        .word $global$

is okay.

(gdb) r
Starting program: /home/dave/ffmpeg/main 

Program received signal SIGSEGV, Segmentation fault.
0x41000548 in _start ()
(gdb) p/x $r19
$1 = 0x41001194
(gdb) x/16x 0x41001194
0x41001194:     0x00001040      0x00000000      0x00000000      0x00000000
0x410011a4:     0x00000000      0x41001028      0x4100102c      0x4100100c
0x410011b4:     0x41001014      0x41001128      0x410011f4      0x410011f8
0x410011c4:     0x41001030      0x41001034      0x41001038      0x4100103c
(gdb) info address .Lpmain
Symbol ".Lpmain" is at 0x41001018 in a file compiled without debugging.
(gdb) x/x 0x41001028
0x41001028:     0x41001194
(gdb) info address $global$
Symbol "$global$" is at 0x41001194 in a file compiled without debugging.
(gdb) x/x 0x41001028
0x41001028:     0x41001194
(gdb) disass $pc-16,$pc+16
Dump of assembler code from 0x41000538 to 0x41000558:
   0x41000538 <_start+16>:      stw r19,-20(sp)
   0x4100053c <_start+20>:      stw r23,-38(sp)
   0x41000540 <_start+24>:      addil L%0,r19,r1
   0x41000544 <_start+28>:      ldw 8(r1),r26
=> 0x41000548 <_start+32>:      ldw 0(r26),r26
   0x4100054c <_start+36>:      addil L%0,r19,r1
   0x41000550 <_start+40>:      ldw c(r1),r23
   0x41000554 <_start+44>:      ldw 0(r23),r23

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]