Blindly following x86 broke linux kernel builds.
bfd/
* elf32-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define as true.
* elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Likewise.
gas/
* testsuite/gas/ppc/power4.d: Adjust for section sym change.
* testsuite/gas/ppc/test1elf32.d: Likewise.
* testsuite/gas/ppc/test1elf64.d: Likewise.
ld/
* testsuite/ld-powerpc/tlsexe.r: Adjust for section sym change.
* testsuite/ld-powerpc/tlsexe32.r: Likewise.
* testsuite/ld-powerpc/tlsexe32no.r: Likewise.
* testsuite/ld-powerpc/tlsexeno.r: Likewise.
* testsuite/ld-powerpc/tlsexenors.r: Likewise.
* testsuite/ld-powerpc/tlsexers.r: Likewise.
* testsuite/ld-powerpc/tlsexetoc.r: Likewise.
* testsuite/ld-powerpc/tlsexetocrs.r: Likewise.
* testsuite/ld-powerpc/tlsget.d: Likewise.
* testsuite/ld-powerpc/tlsget.wf: Likewise.
* testsuite/ld-powerpc/tlsget2.d: Likewise.
* testsuite/ld-powerpc/tlsget2.wf: Likewise.
* testsuite/ld-powerpc/tlsso.r: Likewise.
* testsuite/ld-powerpc/tlsso32.r: Likewise.
* testsuite/ld-powerpc/tlstocso.r: Likewise.
Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
Boston, MA 02110-1301, USA. */
-/* Don't generate unused section symbols. */
-#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS false
+/* The assembler should generate a full set of section symbols even
+ when they appear unused. The linux kernel build tool recordmcount
+ needs them. */
+#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS true
#include "sysdep.h"
#include <stdarg.h>
http://www.linuxbase.org/spec/ELF/ppc64/PPC-elf64abi.txt, and
http://www.linuxbase.org/spec/ELF/ppc64/spec/book1.html */
-/* Don't generate unused section symbols. */
-#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS false
+/* The assembler should generate a full set of section symbols even
+ when they appear unused. The linux kernel build tool recordmcount
+ needs them. */
+#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS true
#include "sysdep.h"
#include <stdarg.h>
SYMBOL TABLE:
0+ l +d +\.text 0+ (|\.text)
0+ l +d +\.data 0+ (|\.data)
+0+ l +d +\.bss 0+ (|\.bss)
0+ l +\.data 0+ dsym0
0+10 l +\.data 0+ dsym1
0+ l +d +\.toc 0+ (|\.toc)
SYMBOL TABLE:
0+0000 l d \.text 0+0000 (|\.text)
0+0000 l d \.data 0+0000 (|\.data)
+0+0000 l d \.bss 0+0000 (|\.bss)
0+0000 l \.data 0+0000 dsym0
0+0004 l \.data 0+0000 dsym1
0+0004 l \.data 0+0000 usym0
SYMBOL TABLE:
0000000000000000 l d \.text 0000000000000000 (|\.text)
0000000000000000 l d \.data 0000000000000000 (|\.data)
+0000000000000000 l d \.bss 0000000000000000 (|\.bss)
0000000000000000 l \.data 0000000000000000 dsym0
0000000000000008 l \.data 0000000000000000 dsym1
0000000000000000 l d \.toc 0000000000000000 (|\.toc)
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
.* 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+.* SECTION +LOCAL +DEFAULT +1 \.interp
+.* SECTION +LOCAL +DEFAULT +2 \.hash
+.* SECTION +LOCAL +DEFAULT +3 \.dynsym
+.* SECTION +LOCAL +DEFAULT +4 \.dynstr
+.* SECTION +LOCAL +DEFAULT +5 \.rela\.dyn
+.* SECTION +LOCAL +DEFAULT +6 \.rela\.plt
+.* SECTION +LOCAL +DEFAULT +7 \.text
+.* SECTION +LOCAL +DEFAULT +8 \.tdata
+.* SECTION +LOCAL +DEFAULT +9 \.tbss
+.* SECTION +LOCAL +DEFAULT +10 \.dynamic
+.* SECTION +LOCAL +DEFAULT +11 \.opd
+.* SECTION +LOCAL +DEFAULT +12 \.got
+.* SECTION +LOCAL +DEFAULT +13 \.plt
.* FILE +LOCAL +DEFAULT +ABS .*
.* NOTYPE +LOCAL +DEFAULT +ABS TLSMARK
.* TLS +LOCAL +DEFAULT +8 gd4
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
.* NOTYPE +LOCAL +DEFAULT +UND
+.* SECTION +LOCAL +DEFAULT +1 \.interp
+.* SECTION +LOCAL +DEFAULT +2 \.hash
+.* SECTION +LOCAL +DEFAULT +3 \.dynsym
+.* SECTION +LOCAL +DEFAULT +4 \.dynstr
+.* SECTION +LOCAL +DEFAULT +5 \.rela\.dyn
+.* SECTION +LOCAL +DEFAULT +6 \.rela\.plt
+.* SECTION +LOCAL +DEFAULT +7 \.text
+.* SECTION +LOCAL +DEFAULT +8 \.tdata
+.* SECTION +LOCAL +DEFAULT +9 \.tbss
+.* SECTION +LOCAL +DEFAULT +10 \.dynamic
+.* SECTION +LOCAL +DEFAULT +11 \.got
+.* SECTION +LOCAL +DEFAULT +12 \.plt
.* FILE +LOCAL +DEFAULT +ABS .*
.* NOTYPE +LOCAL +DEFAULT +ABS TLSMARK
.* TLS +LOCAL +DEFAULT +8 gd4
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
.* NOTYPE +LOCAL +DEFAULT +UND
+.* SECTION +LOCAL +DEFAULT +1 \.interp
+.* SECTION +LOCAL +DEFAULT +2 \.hash
+.* SECTION +LOCAL +DEFAULT +3 \.dynsym
+.* SECTION +LOCAL +DEFAULT +4 \.dynstr
+.* SECTION +LOCAL +DEFAULT +5 \.rela\.dyn
+.* SECTION +LOCAL +DEFAULT +6 \.rela\.plt
+.* SECTION +LOCAL +DEFAULT +7 \.text
+.* SECTION +LOCAL +DEFAULT +8 \.tdata
+.* SECTION +LOCAL +DEFAULT +9 \.tbss
+.* SECTION +LOCAL +DEFAULT +10 \.dynamic
+.* SECTION +LOCAL +DEFAULT +11 \.got
+.* SECTION +LOCAL +DEFAULT +12 \.plt
.* FILE +LOCAL +DEFAULT +ABS .*
.* NOTYPE +LOCAL +DEFAULT +ABS TLSMARK
.* TLS +LOCAL +DEFAULT +8 gd4
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
.* 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+.* SECTION +LOCAL +DEFAULT +1 \.interp
+.* SECTION +LOCAL +DEFAULT +2 \.hash
+.* SECTION +LOCAL +DEFAULT +3 \.dynsym
+.* SECTION +LOCAL +DEFAULT +4 \.dynstr
+.* SECTION +LOCAL +DEFAULT +5 \.rela\.dyn
+.* SECTION +LOCAL +DEFAULT +6 \.rela\.plt
+.* SECTION +LOCAL +DEFAULT +7 \.text
+.* SECTION +LOCAL +DEFAULT +8 \.tdata
+.* SECTION +LOCAL +DEFAULT +9 \.tbss
+.* SECTION +LOCAL +DEFAULT +10 \.dynamic
+.* SECTION +LOCAL +DEFAULT +11 \.opd
+.* SECTION +LOCAL +DEFAULT +12 \.got
+.* SECTION +LOCAL +DEFAULT +13 \.plt
.* FILE +LOCAL +DEFAULT +ABS .*
.* NOTYPE +LOCAL +DEFAULT +ABS TLSMARK
.* TLS +LOCAL +DEFAULT +8 gd4
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
.* 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+.* SECTION +LOCAL +DEFAULT +1 \.interp
+.* SECTION +LOCAL +DEFAULT +2 \.hash
+.* SECTION +LOCAL +DEFAULT +3 \.dynsym
+.* SECTION +LOCAL +DEFAULT +4 \.dynstr
+.* SECTION +LOCAL +DEFAULT +5 \.rela\.dyn
+.* SECTION +LOCAL +DEFAULT +6 \.rela\.plt
+.* SECTION +LOCAL +DEFAULT +7 \.text
+.* SECTION +LOCAL +DEFAULT +8 \.tdata
+.* SECTION +LOCAL +DEFAULT +9 \.tbss
+.* SECTION +LOCAL +DEFAULT +10 \.dynamic
+.* SECTION +LOCAL +DEFAULT +11 \.opd
+.* SECTION +LOCAL +DEFAULT +12 \.got
+.* SECTION +LOCAL +DEFAULT +13 \.plt
.* FILE +LOCAL +DEFAULT +ABS .*
.* NOTYPE +LOCAL +DEFAULT +ABS TLSMARK
.* TLS +LOCAL +DEFAULT +8 gd4
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
.* 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+.* SECTION +LOCAL +DEFAULT +1 \.interp
+.* SECTION +LOCAL +DEFAULT +2 \.hash
+.* SECTION +LOCAL +DEFAULT +3 \.dynsym
+.* SECTION +LOCAL +DEFAULT +4 \.dynstr
+.* SECTION +LOCAL +DEFAULT +5 \.rela\.dyn
+.* SECTION +LOCAL +DEFAULT +6 \.rela\.plt
+.* SECTION +LOCAL +DEFAULT +7 \.text
+.* SECTION +LOCAL +DEFAULT +8 \.tdata
+.* SECTION +LOCAL +DEFAULT +9 \.tbss
+.* SECTION +LOCAL +DEFAULT +10 \.dynamic
+.* SECTION +LOCAL +DEFAULT +11 \.opd
+.* SECTION +LOCAL +DEFAULT +12 \.got
+.* SECTION +LOCAL +DEFAULT +13 \.plt
.* FILE +LOCAL +DEFAULT +ABS .*
.* NOTYPE +LOCAL +DEFAULT +ABS TLSMARK
.* TLS +LOCAL +DEFAULT +8 gd4
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
.* NOTYPE +LOCAL +DEFAULT +UND *
+.* SECTION +LOCAL +DEFAULT +1 \.interp
+.* SECTION +LOCAL +DEFAULT +2 \.hash
+.* SECTION +LOCAL +DEFAULT +3 \.dynsym
+.* SECTION +LOCAL +DEFAULT +4 \.dynstr
+.* SECTION +LOCAL +DEFAULT +5 \.rela\.dyn
+.* SECTION +LOCAL +DEFAULT +6 \.rela\.plt
+.* SECTION +LOCAL +DEFAULT +7 \.text
+.* SECTION +LOCAL +DEFAULT +8 \.tdata
+.* SECTION +LOCAL +DEFAULT +9 \.tbss
+.* SECTION +LOCAL +DEFAULT +10 \.dynamic
+.* SECTION +LOCAL +DEFAULT +11 \.opd
+.* SECTION +LOCAL +DEFAULT +12 \.got
+.* SECTION +LOCAL +DEFAULT +13 \.plt
.* FILE +LOCAL +DEFAULT +ABS .*
.* TLS +LOCAL +DEFAULT +8 gd4
.* TLS +LOCAL +DEFAULT +8 ld4
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
.* NOTYPE +LOCAL +DEFAULT +UND *
+.* SECTION +LOCAL +DEFAULT +1 \.interp
+.* SECTION +LOCAL +DEFAULT +2 \.hash
+.* SECTION +LOCAL +DEFAULT +3 \.dynsym
+.* SECTION +LOCAL +DEFAULT +4 \.dynstr
+.* SECTION +LOCAL +DEFAULT +5 \.rela\.dyn
+.* SECTION +LOCAL +DEFAULT +6 \.rela\.plt
+.* SECTION +LOCAL +DEFAULT +7 \.text
+.* SECTION +LOCAL +DEFAULT +8 \.tdata
+.* SECTION +LOCAL +DEFAULT +9 \.tbss
+.* SECTION +LOCAL +DEFAULT +10 \.dynamic
+.* SECTION +LOCAL +DEFAULT +11 \.opd
+.* SECTION +LOCAL +DEFAULT +12 \.got
+.* SECTION +LOCAL +DEFAULT +13 \.plt
.* FILE +LOCAL +DEFAULT +ABS .*
.* TLS +LOCAL +DEFAULT +8 gd4
.* TLS +LOCAL +DEFAULT +8 ld4
Disassembly of section \.text:
+.* <.*\.plt_call\..*>:
+.*: (04 10 .. ..|.. .. 10 04) pld r12,.*
+.*: (e5 80 .. ..|.. .. 80 e5)
+.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
+.*: (4e 80 04 20|20 04 80 4e) bctr
+.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\)
+.*: (e9 82 .. ..|.. .. 82 e9) ld r12,.*\(r2\)
+.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
+.*: (4e 80 04 20|20 04 80 4e) bctr
+
.* <.*\.plt_call\.__tls_get_addr_opt.*>:
.*: (e8 03 00 00|00 00 03 e8) ld r0,0\(r3\)
.*: (e9 83 00 08|08 00 83 e9) ld r12,8\(r3\)
.*: (e8 01 00 08|08 00 01 e8) ld r0,8\(r1\)
.*: (7c 08 03 a6|a6 03 08 7c) mtlr r0
.*: (4e 80 00 20|20 00 80 4e) blr
-
-.* <.*\.plt_call\..*>:
-.*: (60 00 00 00|00 00 00 60) nop
-.*: (04 10 .. ..|.. .. 10 04) pld r12,.*
-.*: (e5 80 .. ..|.. .. 80 e5)
-.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
-.*: (4e 80 04 20|20 04 80 4e) bctr
-.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\)
-.*: (e9 82 .. ..|.. .. 82 e9) ld r12,.*\(r2\)
-.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
-.*: (4e 80 04 20|20 04 80 4e) bctr
#...
.* <_start>:
.*: (4b ff .. ..|.. .. ff 4b) bl .* <.*\.plt_call\.__tls_get_addr_opt.*\+0x30>
.*: (60 00 00 00|00 00 00 60) nop
.*: (4b ff .. ..|.. .. ff 4b) bl .* <.*\.plt_call\..*:[^\+]*>
-.*: (4b ff .. ..|.. .. ff 4b) bl .* <.*.plt_call\..*:.*\+0x14>
+.*: (4b ff .. ..|.. .. ff 4b) bl .* <.*.plt_call\..*:.*\+0x10>
.*: (e8 41 00 18|18 00 41 e8) ld r2,24\(r1\)
.* <fun>:
Augmentation data: 1b
DW_CFA_def_cfa: r1 ofs 0
-0+14 0+14 0+18 FDE cie=0+ pc=0+280..0+318
- DW_CFA_advance_loc: 96 to 0+2e0
+0+14 0+14 0+18 FDE cie=0+ pc=0+280..0+314
+ DW_CFA_advance_loc: 128 to 0+300
DW_CFA_offset_extended_sf: r65 at cfa\+8
DW_CFA_advance_loc: 16 to .*
DW_CFA_restore_extended: r65
Disassembly of section \.text:
+.* <.*\.plt_call\..*>:
+.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\)
+.*: (60 00 00 00|00 00 00 60) nop
+.*: (04 10 .. ..|.. .. 10 04) pld r12,.*
+.*: (e5 80 .. ..|.. .. 80 e5)
+.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
+.*: (4e 80 04 20|20 04 80 4e) bctr
+
.* <.*\.plt_call\.__tls_get_addr_opt.*>:
.*: (e8 03 00 00|00 00 03 e8) ld r0,0\(r3\)
.*: (e9 83 00 08|08 00 83 e9) ld r12,8\(r3\)
.*: (e8 01 00 08|08 00 01 e8) ld r0,8\(r1\)
.*: (7c 08 03 a6|a6 03 08 7c) mtlr r0
.*: (4e 80 00 20|20 00 80 4e) blr
-
-.* <.*\.plt_call\..*>:
-.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\)
-.*: (60 00 00 00|00 00 00 60) nop
-.*: (04 10 .. ..|.. .. 10 04) pld r12,.*
-.*: (e5 80 .. ..|.. .. 80 e5)
-.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
-.*: (4e 80 04 20|20 04 80 4e) bctr
#...
.* <_start>:
DW_CFA_def_cfa: r1 ofs 0
0+14 0+14 0+18 FDE cie=0+ pc=0+280..0+2e0
- DW_CFA_advance_loc: 52 to 0+2b4
+ DW_CFA_advance_loc: 76 to 0+2cc
DW_CFA_offset_extended_sf: r65 at cfa\+8
DW_CFA_advance_loc: 16 to .*
DW_CFA_restore_extended: r65
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
.* NOTYPE +LOCAL +DEFAULT +UND *
+.* SECTION +LOCAL +DEFAULT +1 \.hash
+.* SECTION +LOCAL +DEFAULT +2 \.dynsym
+.* SECTION +LOCAL +DEFAULT +3 \.dynstr
+.* SECTION +LOCAL +DEFAULT +4 \.rela\.dyn
+.* SECTION +LOCAL +DEFAULT +5 \.rela\.plt
+.* SECTION +LOCAL +DEFAULT +6 \.text
+.* SECTION +LOCAL +DEFAULT +7 \.tdata
+.* SECTION +LOCAL +DEFAULT +8 \.tbss
+.* SECTION +LOCAL +DEFAULT +9 \.dynamic
+.* SECTION +LOCAL +DEFAULT +10 \.opd
+.* SECTION +LOCAL +DEFAULT +11 \.got
+.* SECTION +LOCAL +DEFAULT +12 \.plt
.* FILE +LOCAL +DEFAULT +ABS .*
.* NOTYPE +LOCAL +DEFAULT +ABS TLSMARK
.* TLS +LOCAL +DEFAULT +7 gd4
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
.* NOTYPE +LOCAL +DEFAULT +UND
+.* SECTION +LOCAL +DEFAULT +1 \.hash
+.* SECTION +LOCAL +DEFAULT +2 \.dynsym
+.* SECTION +LOCAL +DEFAULT +3 \.dynstr
+.* SECTION +LOCAL +DEFAULT +4 \.rela\.dyn
+.* SECTION +LOCAL +DEFAULT +5 \.rela\.plt
+.* SECTION +LOCAL +DEFAULT +6 \.text
+.* SECTION +LOCAL +DEFAULT +7 \.tdata
+.* SECTION +LOCAL +DEFAULT +8 \.tbss
+.* SECTION +LOCAL +DEFAULT +9 \.dynamic
+.* SECTION +LOCAL +DEFAULT +10 \.got
+.* SECTION +LOCAL +DEFAULT +11 \.plt
.* FILE +LOCAL +DEFAULT +ABS .*
.* NOTYPE +LOCAL +DEFAULT +ABS TLSMARK
.* TLS +LOCAL +DEFAULT +7 gd4
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name
.* NOTYPE +LOCAL +DEFAULT +UND *
+.* SECTION +LOCAL +DEFAULT +1 \.hash
+.* SECTION +LOCAL +DEFAULT +2 \.dynsym
+.* SECTION +LOCAL +DEFAULT +3 \.dynstr
+.* SECTION +LOCAL +DEFAULT +4 \.rela\.dyn
+.* SECTION +LOCAL +DEFAULT +5 \.rela\.plt
+.* SECTION +LOCAL +DEFAULT +6 \.text
+.* SECTION +LOCAL +DEFAULT +7 \.tdata
+.* SECTION +LOCAL +DEFAULT +8 \.tbss
+.* SECTION +LOCAL +DEFAULT +9 \.dynamic
+.* SECTION +LOCAL +DEFAULT +10 \.opd
+.* SECTION +LOCAL +DEFAULT +11 \.got
+.* SECTION +LOCAL +DEFAULT +12 \.plt
.* FILE +LOCAL +DEFAULT +ABS .*
.* TLS +LOCAL +DEFAULT +7 gd4
.* TLS +LOCAL +DEFAULT +7 ld4