mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
bfd/
* elf64-ppc.c (create_linkage_sections): Use section ".branch_lt" for branch lookup table. ld/ * emulparams/elf64ppc.sh (OTHER_READWRITE_SECTIONS): Add ".branch_lt". * emultempl/ppc64elf.em (ppc_add_stub_section): Create without SEC_RELOC flag set. ld/testsuite/ * ld-powerpc/relbrlt.d: Update. * ld-powerpc/tlsexe.r: Update. * ld-powerpc/tlsexetoc.r: Update. * ld-powerpc/tlsso.r: Update. * ld-powerpc/tlstocso.r: Update.
This commit is contained in:
parent
7e2b0ba31b
commit
e4e0193e2b
@ -1,3 +1,8 @@
|
||||
2007-02-13 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* elf64-ppc.c (create_linkage_sections): Use section ".branch_lt"
|
||||
for branch lookup table.
|
||||
|
||||
2007-02-12 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* elf64-ppc.c (create_linkage_sections): Don't create
|
||||
|
@ -3818,37 +3818,22 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info)
|
||||
return FALSE;
|
||||
|
||||
/* Create branch lookup table for plt_branch stubs. */
|
||||
if (info->shared)
|
||||
{
|
||||
flags = (SEC_ALLOC | SEC_LOAD
|
||||
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
|
||||
htab->brlt
|
||||
= bfd_make_section_anyway_with_flags (dynobj, ".data.rel.ro.brlt",
|
||||
flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
|
||||
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
|
||||
htab->brlt
|
||||
= bfd_make_section_anyway_with_flags (dynobj, ".rodata.brlt", flags);
|
||||
}
|
||||
|
||||
flags = (SEC_ALLOC | SEC_LOAD
|
||||
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
|
||||
htab->brlt = bfd_make_section_anyway_with_flags (dynobj, ".branch_lt",
|
||||
flags);
|
||||
if (htab->brlt == NULL
|
||||
|| ! bfd_set_section_alignment (dynobj, htab->brlt, 3))
|
||||
return FALSE;
|
||||
|
||||
if (info->shared)
|
||||
{
|
||||
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
|
||||
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
|
||||
htab->relbrlt
|
||||
= bfd_make_section_anyway_with_flags (dynobj, ".rela.data.rel.ro.brlt",
|
||||
flags);
|
||||
}
|
||||
else
|
||||
if (!info->shared)
|
||||
return TRUE;
|
||||
|
||||
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
|
||||
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
|
||||
htab->relbrlt = bfd_make_section_anyway_with_flags (dynobj,
|
||||
".rela.branch_lt",
|
||||
flags);
|
||||
if (!htab->relbrlt
|
||||
|| ! bfd_set_section_alignment (dynobj, htab->relbrlt, 3))
|
||||
return FALSE;
|
||||
|
@ -1,3 +1,9 @@
|
||||
2007-02-13 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* emulparams/elf64ppc.sh (OTHER_READWRITE_SECTIONS): Add ".branch_lt".
|
||||
* emultempl/ppc64elf.em (ppc_add_stub_section): Create without
|
||||
SEC_RELOC flag set.
|
||||
|
||||
2007-02-09 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* configure.in (targ_extra_emuls): Add $targ64_extra_emuls if
|
||||
|
@ -31,7 +31,8 @@ OTHER_GOT_RELOC_SECTIONS="
|
||||
.rela.toc ${RELOCATING-0} : { *(.rela.toc) }"
|
||||
OTHER_READWRITE_SECTIONS="
|
||||
.toc1 ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc1) }
|
||||
.opd ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { KEEP (*(.opd)) }"
|
||||
.opd ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { KEEP (*(.opd)) }
|
||||
.branch_lt ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.branch_lt) }"
|
||||
|
||||
# Treat a host that matches the target with the possible exception of "64"
|
||||
# in the name as if it were native.
|
||||
|
@ -225,7 +225,7 @@ ppc_add_stub_section (const char *stub_sec_name, asection *input_section)
|
||||
goto err_ret;
|
||||
|
||||
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
|
||||
| SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP);
|
||||
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_KEEP);
|
||||
if (!bfd_set_section_flags (stub_file->the_bfd, stub_sec, flags))
|
||||
goto err_ret;
|
||||
|
||||
|
@ -1,3 +1,11 @@
|
||||
2007-02-13 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ld-powerpc/relbrlt.d: Update.
|
||||
* ld-powerpc/tlsexe.r: Update.
|
||||
* ld-powerpc/tlsexetoc.r: Update.
|
||||
* ld-powerpc/tlsso.r: Update.
|
||||
* ld-powerpc/tlstocso.r: Update.
|
||||
|
||||
2007-02-12 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ld-powerpc/relbrlt.d: Update.
|
||||
|
@ -7,44 +7,44 @@
|
||||
|
||||
Disassembly of section \.text:
|
||||
|
||||
0*10000078 <_start>:
|
||||
10000078: 49 bf 00 31 bl 11bf00a8 .*
|
||||
10000078: R_PPC64_REL24 \.text\+0x37e0044
|
||||
1000007c: 60 00 00 00 nop
|
||||
10000080: 49 bf 00 19 bl 11bf0098 .*
|
||||
10000080: R_PPC64_REL24 \.text\+0x3bf0020
|
||||
10000084: 60 00 00 00 nop
|
||||
10000088: 49 bf 00 25 bl 11bf00ac .*
|
||||
10000088: R_PPC64_REL24 \.text\+0x57e0024
|
||||
1000008c: 60 00 00 00 nop
|
||||
10000090: 00 00 00 00 \.long 0x0
|
||||
10000094: 4b ff ff e4 b 10000078 <_start>
|
||||
0*100000b0 <_start>:
|
||||
[0-9a-f ]*: 49 bf 00 31 bl .*
|
||||
[0-9a-f ]*: R_PPC64_REL24 \.text\+0x37e0044
|
||||
[0-9a-f ]*: 60 00 00 00 nop
|
||||
[0-9a-f ]*: 49 bf 00 19 bl .*
|
||||
[0-9a-f ]*: R_PPC64_REL24 \.text\+0x3bf0020
|
||||
[0-9a-f ]*: 60 00 00 00 nop
|
||||
[0-9a-f ]*: 49 bf 00 25 bl .*
|
||||
[0-9a-f ]*: R_PPC64_REL24 \.text\+0x57e0024
|
||||
[0-9a-f ]*: 60 00 00 00 nop
|
||||
[0-9a-f ]*: 00 00 00 00 \.long 0x0
|
||||
[0-9a-f ]*: 4b ff ff e4 b .* <_start>
|
||||
\.\.\.
|
||||
|
||||
0*11bf0098 <.*plt_branch.*>:
|
||||
11bf0098: 3d 82 05 7e addis r12,r2,1406
|
||||
11bf009c: e9 6c 80 28 ld r11,-32728\(r12\)
|
||||
11bf00a0: 7d 69 03 a6 mtctr r11
|
||||
11bf00a4: 4e 80 04 20 bctr
|
||||
[0-9a-f ]*<.*plt_branch.*>:
|
||||
[0-9a-f ]*: 3d 82 00 00 addis r12,r2,0
|
||||
[0-9a-f ]*: e9 6c 80 00 ld r11,-32768\(r12\)
|
||||
[0-9a-f ]*: 7d 69 03 a6 mtctr r11
|
||||
[0-9a-f ]*: 4e 80 04 20 bctr
|
||||
|
||||
0*11bf00a8 <.*long_branch.*>:
|
||||
11bf00a8: 49 bf 00 14 b 137e00bc <far>
|
||||
11bf00a8: R_PPC64_REL24 \*ABS\*\+0x137e00bc
|
||||
[0-9a-f ]*<.*long_branch.*>:
|
||||
[0-9a-f ]*: 49 bf 00 14 b .* <far>
|
||||
[0-9a-f ]*: R_PPC64_REL24 \*ABS\*\+0x137e00f4
|
||||
|
||||
0*11bf00ac <.*plt_branch.*>:
|
||||
11bf00ac: 3d 82 05 7e addis r12,r2,1406
|
||||
11bf00b0: e9 6c 80 30 ld r11,-32720\(r12\)
|
||||
11bf00b4: 7d 69 03 a6 mtctr r11
|
||||
11bf00b8: 4e 80 04 20 bctr
|
||||
[0-9a-f ]*<.*plt_branch.*>:
|
||||
[0-9a-f ]*: 3d 82 00 00 addis r12,r2,0
|
||||
[0-9a-f ]*: e9 6c 80 08 ld r11,-32760\(r12\)
|
||||
[0-9a-f ]*: 7d 69 03 a6 mtctr r11
|
||||
[0-9a-f ]*: 4e 80 04 20 bctr
|
||||
\.\.\.
|
||||
|
||||
0*137e00bc <far>:
|
||||
137e00bc: 4e 80 00 20 blr
|
||||
0*137e00f4 <far>:
|
||||
[0-9a-f ]*: 4e 80 00 20 blr
|
||||
\.\.\.
|
||||
|
||||
0*13bf0098 <far2far>:
|
||||
13bf0098: 4e 80 00 20 blr
|
||||
[0-9a-f ]*<far2far>:
|
||||
[0-9a-f ]*: 4e 80 00 20 blr
|
||||
\.\.\.
|
||||
|
||||
0*157e009c <huge>:
|
||||
157e009c: 4e 80 00 20 blr
|
||||
[0-9a-f ]*<huge>:
|
||||
[0-9a-f ]*: 4e 80 00 20 blr
|
||||
|
@ -17,10 +17,10 @@ Section Headers:
|
||||
+\[ 5\] \.rela\.dyn +.*
|
||||
+\[ 6\] \.rela\.plt +.*
|
||||
+\[ 7\] \.text +PROGBITS .* 0+100 0+ +AX +0 +0 +8
|
||||
+\[ 8\] \.rodata + PROGBITS .* 0+ 0+ +A +0 +0 +8
|
||||
+\[ 9\] \.tdata +PROGBITS .* 0+38 0+ WAT +0 +0 +8
|
||||
+\[10\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8
|
||||
+\[11\] \.dynamic +DYNAMIC .* 0+150 10 +WA +4 +0 +8
|
||||
+\[ 8\] \.tdata +PROGBITS .* 0+38 0+ WAT +0 +0 +8
|
||||
+\[ 9\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8
|
||||
+\[10\] \.dynamic +DYNAMIC .* 0+150 10 +WA +4 +0 +8
|
||||
+\[11\] \.branch_lt + PROGBITS .* 0+ 0+ +WA +0 +0 +8
|
||||
+\[12\] \.got +PROGBITS .* 0+30 08 +WA +0 +0 +8
|
||||
+\[13\] \.plt +.*
|
||||
+\[14\] \.shstrtab +.*
|
||||
@ -67,7 +67,7 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
|
||||
.* TLS +GLOBAL DEFAULT +UND gd
|
||||
.* FUNC +GLOBAL DEFAULT +UND __tls_get_addr
|
||||
.* TLS +GLOBAL DEFAULT +UND ld
|
||||
.* TLS +GLOBAL DEFAULT +10 ld2
|
||||
.* TLS +GLOBAL DEFAULT +9 ld2
|
||||
.* NOTYPE +GLOBAL DEFAULT +ABS __bss_start
|
||||
.* NOTYPE +GLOBAL DEFAULT +ABS _edata
|
||||
.* NOTYPE +GLOBAL DEFAULT +ABS _end
|
||||
@ -88,26 +88,26 @@ Symbol table '\.symtab' contains .* entries:
|
||||
.* SECTION LOCAL +DEFAULT +11
|
||||
.* SECTION LOCAL +DEFAULT +12
|
||||
.* SECTION LOCAL +DEFAULT +13
|
||||
.* TLS +LOCAL +DEFAULT +9 gd4
|
||||
.* TLS +LOCAL +DEFAULT +9 ld4
|
||||
.* TLS +LOCAL +DEFAULT +9 ld5
|
||||
.* TLS +LOCAL +DEFAULT +9 ld6
|
||||
.* TLS +LOCAL +DEFAULT +9 ie4
|
||||
.* TLS +LOCAL +DEFAULT +9 le4
|
||||
.* TLS +LOCAL +DEFAULT +9 le5
|
||||
.* OBJECT +LOCAL +HIDDEN +11 _DYNAMIC
|
||||
.* TLS +LOCAL +DEFAULT +8 gd4
|
||||
.* TLS +LOCAL +DEFAULT +8 ld4
|
||||
.* TLS +LOCAL +DEFAULT +8 ld5
|
||||
.* TLS +LOCAL +DEFAULT +8 ld6
|
||||
.* TLS +LOCAL +DEFAULT +8 ie4
|
||||
.* TLS +LOCAL +DEFAULT +8 le4
|
||||
.* TLS +LOCAL +DEFAULT +8 le5
|
||||
.* OBJECT +LOCAL +HIDDEN +10 _DYNAMIC
|
||||
.* FUNC +LOCAL +DEFAULT +UND \.__tls_get_addr
|
||||
.* GLOBAL DEFAULT +UND gd
|
||||
.* GLOBAL DEFAULT +10 le0
|
||||
.* GLOBAL DEFAULT +9 le0
|
||||
.* GLOBAL DEFAULT +UND __tls_get_addr
|
||||
.* GLOBAL DEFAULT +10 ld0
|
||||
.* GLOBAL DEFAULT +10 le1
|
||||
.* GLOBAL DEFAULT +9 ld0
|
||||
.* GLOBAL DEFAULT +9 le1
|
||||
.* GLOBAL DEFAULT +UND ld
|
||||
.* NOTYPE +GLOBAL DEFAULT +7 _start
|
||||
.* TLS +GLOBAL DEFAULT +10 ld2
|
||||
.* TLS +GLOBAL DEFAULT +10 ld1
|
||||
.* TLS +GLOBAL DEFAULT +9 ld2
|
||||
.* TLS +GLOBAL DEFAULT +9 ld1
|
||||
.* NOTYPE +GLOBAL DEFAULT +ABS __bss_start
|
||||
.* NOTYPE +GLOBAL DEFAULT +ABS _edata
|
||||
.* NOTYPE +GLOBAL DEFAULT +ABS _end
|
||||
.* TLS +GLOBAL DEFAULT +10 gd0
|
||||
.* TLS +GLOBAL DEFAULT +10 ie0
|
||||
.* TLS +GLOBAL DEFAULT +9 gd0
|
||||
.* TLS +GLOBAL DEFAULT +9 ie0
|
||||
|
@ -17,10 +17,10 @@ Section Headers:
|
||||
+\[ 5\] \.rela\.dyn +.*
|
||||
+\[ 6\] \.rela\.plt +.*
|
||||
+\[ 7\] \.text +PROGBITS .* 0+c0 0+ +AX +0 +0 +8
|
||||
+\[ 8\] \.rodata +PROGBITS .* 0+ 0+ +A +0 +0 +8
|
||||
+\[ 9\] \.tdata +PROGBITS .* 0+38 0+ WAT +0 +0 +8
|
||||
+\[10\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8
|
||||
+\[11\] \.dynamic +DYNAMIC .* 0+150 10 +WA +4 +0 +8
|
||||
+\[ 8\] \.tdata +PROGBITS .* 0+38 0+ WAT +0 +0 +8
|
||||
+\[ 9\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8
|
||||
+\[10\] \.dynamic +DYNAMIC .* 0+150 10 +WA +4 +0 +8
|
||||
+\[11\] \.branch_lt +PROGBITS .* 0+ 0+ +WA +0 +0 +8
|
||||
+\[12\] \.got +PROGBITS .* 0+58 08 +WA +0 +0 +8
|
||||
+\[13\] \.plt +.*
|
||||
+\[14\] \.shstrtab +.*
|
||||
@ -87,27 +87,27 @@ Symbol table '\.symtab' contains .* entries:
|
||||
.* SECTION LOCAL +DEFAULT +11
|
||||
.* SECTION LOCAL +DEFAULT +12
|
||||
.* SECTION LOCAL +DEFAULT +13
|
||||
.* TLS +LOCAL +DEFAULT +9 gd4
|
||||
.* TLS +LOCAL +DEFAULT +9 ld4
|
||||
.* TLS +LOCAL +DEFAULT +9 ld5
|
||||
.* TLS +LOCAL +DEFAULT +9 ld6
|
||||
.* TLS +LOCAL +DEFAULT +9 ie4
|
||||
.* TLS +LOCAL +DEFAULT +9 le4
|
||||
.* TLS +LOCAL +DEFAULT +9 le5
|
||||
.* TLS +LOCAL +DEFAULT +8 gd4
|
||||
.* TLS +LOCAL +DEFAULT +8 ld4
|
||||
.* TLS +LOCAL +DEFAULT +8 ld5
|
||||
.* TLS +LOCAL +DEFAULT +8 ld6
|
||||
.* TLS +LOCAL +DEFAULT +8 ie4
|
||||
.* TLS +LOCAL +DEFAULT +8 le4
|
||||
.* TLS +LOCAL +DEFAULT +8 le5
|
||||
.* NOTYPE +LOCAL +DEFAULT +12 \.Lie0
|
||||
.* OBJECT +LOCAL +HIDDEN +11 _DYNAMIC
|
||||
.* OBJECT +LOCAL +HIDDEN +10 _DYNAMIC
|
||||
.* FUNC +LOCAL +DEFAULT +UND \.__tls_get_addr
|
||||
.* TLS +GLOBAL DEFAULT +UND gd
|
||||
.* TLS +GLOBAL DEFAULT +10 le0
|
||||
.* TLS +GLOBAL DEFAULT +9 le0
|
||||
.* FUNC +GLOBAL DEFAULT +UND __tls_get_addr
|
||||
.* TLS +GLOBAL DEFAULT +10 ld0
|
||||
.* TLS +GLOBAL DEFAULT +10 le1
|
||||
.* TLS +GLOBAL DEFAULT +9 ld0
|
||||
.* TLS +GLOBAL DEFAULT +9 le1
|
||||
.* TLS +GLOBAL DEFAULT +UND ld
|
||||
.* NOTYPE +GLOBAL DEFAULT +7 _start
|
||||
.* TLS +GLOBAL DEFAULT +10 ld2
|
||||
.* TLS +GLOBAL DEFAULT +10 ld1
|
||||
.* TLS +GLOBAL DEFAULT +9 ld2
|
||||
.* TLS +GLOBAL DEFAULT +9 ld1
|
||||
.* NOTYPE +GLOBAL DEFAULT +ABS __bss_start
|
||||
.* NOTYPE +GLOBAL DEFAULT +ABS _edata
|
||||
.* NOTYPE +GLOBAL DEFAULT +ABS _end
|
||||
.* TLS +GLOBAL DEFAULT +10 gd0
|
||||
.* TLS +GLOBAL DEFAULT +10 ie0
|
||||
.* TLS +GLOBAL DEFAULT +9 gd0
|
||||
.* TLS +GLOBAL DEFAULT +9 ie0
|
||||
|
@ -17,8 +17,8 @@ Section Headers:
|
||||
+\[ 6\] \.text .*
|
||||
+\[ 7\] \.tdata +PROGBITS .* 0+38 0+ WAT +0 +0 +8
|
||||
+\[ 8\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8
|
||||
+\[ 9\] \.data\.rel\.ro .*
|
||||
+\[10\] \.dynamic .*
|
||||
+\[ 9\] \.dynamic .*
|
||||
+\[10\] \.branch_lt .*
|
||||
+\[11\] \.got .*
|
||||
+\[12\] \.plt .*
|
||||
+\[13\] \.shstrtab .*
|
||||
|
@ -17,8 +17,8 @@ Section Headers:
|
||||
+\[ 6\] \.text .*
|
||||
+\[ 7\] \.tdata +PROGBITS .* 0+38 0+ WAT +0 +0 +8
|
||||
+\[ 8\] \.tbss +NOBITS .* 0+38 0+ WAT +0 +0 +8
|
||||
+\[ 9\] \.data\.rel\.ro .*
|
||||
+\[10\] \.dynamic .*
|
||||
+\[ 9\] \.dynamic .*
|
||||
+\[10\] \.branch_lt .*
|
||||
+\[11\] \.got .*
|
||||
+\[12\] \.plt .*
|
||||
+\[13\] \.shstrtab .*
|
||||
|
Loading…
Reference in New Issue
Block a user