diff options
author | Alan Modra <amodra@gmail.com> | 2013-10-29 12:39:30 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-10-30 13:35:47 +1030 |
commit | 71a39c98f8bedad54818c62ab2d567b0e2de546b (patch) | |
tree | aa51b26e7261f5b3db779b330d833bcc478169c6 /ld/testsuite/ld-powerpc/tlsso.r | |
parent | f9c6b9078c54ea0f018b673e2ff128e61a0aa666 (diff) | |
download | gdb-71a39c98f8bedad54818c62ab2d567b0e2de546b.zip gdb-71a39c98f8bedad54818c62ab2d567b0e2de546b.tar.gz gdb-71a39c98f8bedad54818c62ab2d567b0e2de546b.tar.bz2 |
Change plt stubs to have destination in r12.
This change is to support the new ELFv2 ABI, which uses the value in
r12 on function entry to calculate the got/toc pointer.
bfd/
* elf64-ppc.c (build_plt_stub): Switch stubs to use r11 as base
reg and r12 as destination.
(ppc_build_one_stub): Likewise.
(ppc64_elf_build_stubs): Likewise for glink.
ld/testsuite/
* ld-powerpc/tls.s: Add proper .opd entry for _start.
* ld-powerpc/tlstoc.s: Likewise.
* ld-powerpc/relbrlt.d: Update for changed stubs.
* ld-powerpc/tls.d: Update for changed stubs and _start .opd entry.
* ld-powerpc/tls.g: Likewise.
* ld-powerpc/tlsexe.d: Likewise.
* ld-powerpc/tlsexe.g: Likewise.
* ld-powerpc/tlsexe.r: Likewise.
* ld-powerpc/tlsexetoc.d: Likewise.
* ld-powerpc/tlsexetoc.g: Likewise.
* ld-powerpc/tlsexetoc.r: Likewise.
* ld-powerpc/tlsso.d: Likewise.
* ld-powerpc/tlsso.g: Likewise.
* ld-powerpc/tlsso.r: Likewise.
* ld-powerpc/tlstoc.d: Likewise.
* ld-powerpc/tlstoc.g: Likewise.
* ld-powerpc/tlstocso.d: Likewise.
* ld-powerpc/tlstocso.g: Likewise.
* ld-powerpc/tlstocso.r: Likewise.
Diffstat (limited to 'ld/testsuite/ld-powerpc/tlsso.r')
-rw-r--r-- | ld/testsuite/ld-powerpc/tlsso.r | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/ld/testsuite/ld-powerpc/tlsso.r b/ld/testsuite/ld-powerpc/tlsso.r index bc0c2ca..ddaaebc 100644 --- a/ld/testsuite/ld-powerpc/tlsso.r +++ b/ld/testsuite/ld-powerpc/tlsso.r @@ -18,6 +18,7 @@ Section Headers: +\[[ 0-9]+\] \.tdata +PROGBITS .* 0+38 0+ WAT +0 +0 +8 +\[[ 0-9]+\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8 +\[[ 0-9]+\] \.dynamic .* + +\[[ 0-9]+\] \.opd .* +\[[ 0-9]+\] \.got .* +\[[ 0-9]+\] \.plt .* +\[[ 0-9]+\] \.shstrtab .* @@ -38,13 +39,15 @@ Program Headers: Section to Segment mapping: +Segment Sections\.\.\. - +0+ +\.hash \.dynsym \.dynstr \.rela\.dyn \.rela\.plt \.text - +01 +\.tdata \.dynamic .got \.plt - +02 +\.dynamic - +03 +\.tdata \.tbss + +0+ +\.hash \.dynsym \.dynstr \.rela\.dyn \.rela\.plt \.text * + +01 +\.tdata \.dynamic \.opd \.got \.plt * + +02 +\.dynamic * + +03 +\.tdata \.tbss * -Relocation section '\.rela\.dyn' at offset .* contains 16 entries: +Relocation section '\.rela\.dyn' at offset .* contains 18 entries: +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend +[0-9a-f ]+R_PPC64_RELATIVE +55c +[0-9a-f ]+R_PPC64_RELATIVE +187e0 [0-9a-f ]+R_PPC64_TPREL16 +0+60 le0 \+ 0 [0-9a-f ]+R_PPC64_TPREL16_HA +0+68 le1 \+ 0 [0-9a-f ]+R_PPC64_TPREL16_LO +0+68 le1 \+ 0 @@ -68,38 +71,39 @@ Relocation section '\.rela\.plt' at offset .* contains 1 entries: Symbol table '\.dynsym' contains [0-9]+ entries: +Num: +Value +Size +Type +Bind +Vis +Ndx +Name -.* NOTYPE +LOCAL +DEFAULT +UND -.* SECTION +LOCAL +DEFAULT +6 -.* SECTION +LOCAL +DEFAULT +7 +.* NOTYPE +LOCAL +DEFAULT +UND * +.* SECTION +LOCAL +DEFAULT +6 * +.* SECTION +LOCAL +DEFAULT +7 * .* TLS +GLOBAL +DEFAULT +UND gd .* TLS +GLOBAL +DEFAULT +8 le0 .* NOTYPE +GLOBAL +DEFAULT +UND __tls_get_addr .* TLS +GLOBAL +DEFAULT +8 ld0 .* TLS +GLOBAL +DEFAULT +8 le1 .* TLS +GLOBAL +DEFAULT +UND ld -.* NOTYPE +GLOBAL +DEFAULT +6 _start +.* FUNC +GLOBAL +DEFAULT +10 _start .* TLS +GLOBAL +DEFAULT +8 ld2 .* TLS +GLOBAL +DEFAULT +8 ld1 -.* NOTYPE +GLOBAL +DEFAULT +11 __bss_start -.* NOTYPE +GLOBAL +DEFAULT +10 _edata -.* NOTYPE +GLOBAL +DEFAULT +11 _end +.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start +.* NOTYPE +GLOBAL +DEFAULT +11 _edata +.* NOTYPE +GLOBAL +DEFAULT +12 _end .* TLS +GLOBAL +DEFAULT +8 gd0 .* TLS +GLOBAL +DEFAULT +8 ie0 Symbol table '\.symtab' contains [0-9]+ entries: +Num: +Value +Size +Type +Bind +Vis +Ndx +Name -.* NOTYPE +LOCAL +DEFAULT +UND -.* SECTION +LOCAL +DEFAULT +1 -.* SECTION +LOCAL +DEFAULT +2 -.* SECTION +LOCAL +DEFAULT +3 -.* SECTION +LOCAL +DEFAULT +4 -.* SECTION +LOCAL +DEFAULT +5 -.* SECTION +LOCAL +DEFAULT +6 -.* SECTION +LOCAL +DEFAULT +7 -.* SECTION +LOCAL +DEFAULT +8 -.* SECTION +LOCAL +DEFAULT +9 -.* SECTION +LOCAL +DEFAULT +10 -.* SECTION +LOCAL +DEFAULT +11 +.* NOTYPE +LOCAL +DEFAULT +UND * +.* SECTION +LOCAL +DEFAULT +1 * +.* SECTION +LOCAL +DEFAULT +2 * +.* SECTION +LOCAL +DEFAULT +3 * +.* SECTION +LOCAL +DEFAULT +4 * +.* SECTION +LOCAL +DEFAULT +5 * +.* SECTION +LOCAL +DEFAULT +6 * +.* SECTION +LOCAL +DEFAULT +7 * +.* SECTION +LOCAL +DEFAULT +8 * +.* SECTION +LOCAL +DEFAULT +9 * +.* SECTION +LOCAL +DEFAULT +10 * +.* SECTION +LOCAL +DEFAULT +11 * +.* SECTION +LOCAL +DEFAULT +12 * .* FILE +LOCAL +DEFAULT +ABS .* .* TLS +LOCAL +DEFAULT +7 gd4 .* TLS +LOCAL +DEFAULT +7 ld4 @@ -119,11 +123,11 @@ Symbol table '\.symtab' contains [0-9]+ entries: .* TLS +GLOBAL +DEFAULT +8 ld0 .* TLS +GLOBAL +DEFAULT +8 le1 .* TLS +GLOBAL +DEFAULT +UND ld -.* NOTYPE +GLOBAL +DEFAULT +6 _start +.* FUNC +GLOBAL +DEFAULT +10 _start .* TLS +GLOBAL +DEFAULT +8 ld2 .* TLS +GLOBAL +DEFAULT +8 ld1 -.* NOTYPE +GLOBAL +DEFAULT +11 __bss_start -.* NOTYPE +GLOBAL +DEFAULT +10 _edata -.* NOTYPE +GLOBAL +DEFAULT +11 _end +.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start +.* NOTYPE +GLOBAL +DEFAULT +11 _edata +.* NOTYPE +GLOBAL +DEFAULT +12 _end .* TLS +GLOBAL +DEFAULT +8 gd0 .* TLS +GLOBAL +DEFAULT +8 ie0 |