]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd/
authorAlan Modra <amodra@gmail.com>
Tue, 13 Feb 2007 01:53:03 +0000 (01:53 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 13 Feb 2007 01:53:03 +0000 (01:53 +0000)
* 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.

bfd/ChangeLog
bfd/elf64-ppc.c
ld/ChangeLog
ld/emulparams/elf64ppc.sh
ld/emultempl/ppc64elf.em
ld/testsuite/ChangeLog
ld/testsuite/ld-powerpc/relbrlt.d
ld/testsuite/ld-powerpc/tlsexe.r
ld/testsuite/ld-powerpc/tlsexetoc.r
ld/testsuite/ld-powerpc/tlsso.r
ld/testsuite/ld-powerpc/tlstocso.r

index 941051056d0554d05abb472a58d70a428c83c73a..fd34de2f8a88a2533e97feb79cfcdcac83f6deb6 100644 (file)
@@ -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
index 41a917a1a7f6c160409dd36d66ae0db523e0fd2e..b6f5b35fcc9cfed33d87bbefca956a40c8cc3de1 100644 (file)
@@ -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;
index 93e7af9dfc4ba76dcf010c5f5de56a02a1a528b1..eab2dc99a0e98eab462c2c0b7c182e41cf31851f 100644 (file)
@@ -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
index 75fd075e91046cc3802504009f3a275961bffc54..2fecba8c3ebe9ff14aa2b1c0a1b7849e4cd54e79 100644 (file)
@@ -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.
index 8823b11b3fc060378284c4c649550899c136e4e5..deefe4123d5911b354149c5cd21570a2ef09587e 100644 (file)
@@ -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;
 
index fbd449a3b227496307eca5799ec0caa635de3f63..22c643b3ec598e18364878ff49951c54ee025fcb 100644 (file)
@@ -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.
index 7622ed635d6256daaf1442b5cee4f82e027803bb..1bba8aaa9fae6bf5639e512cd7fc07b070c8d851 100644 (file)
@@ -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*11bf00a8 <.*long_branch.*>:
-    11bf00a8:  49 bf 00 14     b       137e00bc <far>
-                       11bf00a8: R_PPC64_REL24 \*ABS\*\+0x137e00bc
-
-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 00     ld      r11,-32768\(r12\)
+[0-9a-f         ]*:    7d 69 03 a6     mtctr   r11
+[0-9a-f         ]*:    4e 80 04 20     bctr
+
+[0-9a-f         ]*<.*long_branch.*>:
+[0-9a-f         ]*:    49 bf 00 14     b       .* <far>
+[0-9a-f         ]*: R_PPC64_REL24      \*ABS\*\+0x137e00f4
+
+[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
index 1cf4cef8297ca4fab3ab81e27deb5a2baa34390e..4992ab2fd275fb32456dfa4e902c128340e81ce8 100644 (file)
@@ -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
index 40fe383328420d2c8ccc8ed2016b65fa470522f3..d92edd4a25e4b627cc6835373395be57149a1130 100644 (file)
@@ -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
index 7e4ff20506c98e2d551acdae4e11831987f2f3fe..69fff679ac61efed213b4f4f12248c0a78d360f3 100644 (file)
@@ -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 .*
index 38ef5aa42a53aa8b2a478e24ccf45841204e63e3..ca59f4ea4bb2618f0e8cb26bc52f4c863e8eed6e 100644 (file)
@@ -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 .*