From: Alan Modra Date: Mon, 21 Mar 2005 09:39:54 +0000 (+0000) Subject: ld/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b1ab97771ea3ce4842da7afd06aec65ff3fd0620;p=binutils-gdb.git ld/ * emultempl/ppc64elf.em (ppc_finish): Rename from gld${EMULATION_NAME}_finish. Call gld${EMULATION_NAME}_finish. (LDEMUL_FINISH): Update. * emultempl/hppaelf.em (hppaelf_finish, LDEMUL_FINISH): Likewise. * emultempl/m68hc1xelf.em (m68hc11elf_finish, LDEMUL_FINISH): Likewise. ld/testsuite/ * ld-powerpc/tlsexe.r: Update. * ld-powerpc/tlsexetoc.r: Update. * ld-powerpc/tlsso.r: Update. * ld-powerpc/tlstocso.r: Update. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 587ff95c6bb..95c97a36351 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2005-03-21 Alan Modra + + * emultempl/ppc64elf.em (ppc_finish): Rename from + gld${EMULATION_NAME}_finish. Call gld${EMULATION_NAME}_finish. + (LDEMUL_FINISH): Update. + * emultempl/hppaelf.em (hppaelf_finish, LDEMUL_FINISH): Likewise. + * emultempl/m68hc1xelf.em (m68hc11elf_finish, LDEMUL_FINISH): Likewise. + 2005-03-18 Julian Brown * scripttempl/armbpapi.sc (.rel.dyn): Add .rel.init_array, diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em index 01ca7e16905..d8276d2a5b3 100644 --- a/ld/emultempl/hppaelf.em +++ b/ld/emultempl/hppaelf.em @@ -256,7 +256,7 @@ build_section_lists (lang_statement_union_type *statement) to build linker stubs. */ static void -gld${EMULATION_NAME}_finish (void) +hppaelf_finish (void) { /* bfd_elf_discard_info just plays with debugging sections, ie. doesn't affect any code, so we can delay resizing the @@ -312,9 +312,14 @@ gld${EMULATION_NAME}_finish (void) if (stub_file != NULL && stub_file->the_bfd->sections != NULL) { if (! elf32_hppa_build_stubs (&link_info)) - einfo ("%X%P: can not build stubs: %E\n"); + { + einfo ("%X%P: can not build stubs: %E\n"); + return; + } } } + + gld${EMULATION_NAME}_finish (); } @@ -387,5 +392,5 @@ PARSE_AND_LIST_ARGS_CASES=' # Put these extra hppaelf routines in ld_${EMULATION_NAME}_emulation # LDEMUL_AFTER_PARSE=hppaelf_after_parse -LDEMUL_FINISH=gld${EMULATION_NAME}_finish +LDEMUL_FINISH=hppaelf_finish LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=hppaelf_create_output_section_statements diff --git a/ld/emultempl/m68hc1xelf.em b/ld/emultempl/m68hc1xelf.em index ecae4c08b47..890c12052fe 100644 --- a/ld/emultempl/m68hc1xelf.em +++ b/ld/emultempl/m68hc1xelf.em @@ -289,7 +289,7 @@ m68hc11elf_add_stub_section (const char *stub_sec_name, to build linker stubs. */ static void -gld${EMULATION_NAME}_finish (void) +m68hc11elf_finish (void) { /* Now build the linker stubs. */ if (stub_file->the_bfd->sections != NULL) @@ -308,6 +308,8 @@ gld${EMULATION_NAME}_finish (void) if (!elf32_m68hc11_build_stubs (output_bfd, &link_info)) einfo ("%X%P: can not build stubs: %E\n"); } + + gld${EMULATION_NAME}_finish (); } @@ -369,5 +371,5 @@ PARSE_AND_LIST_ARGS_CASES=' # Put these extra m68hc11elf routines in ld_${EMULATION_NAME}_emulation # LDEMUL_BEFORE_ALLOCATION=m68hc11_elf_${EMULATION_NAME}_before_allocation -LDEMUL_FINISH=gld${EMULATION_NAME}_finish +LDEMUL_FINISH=m68hc11elf_finish LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=m68hc11elf_create_output_section_statements diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index f022a182d73..6b5dca9bc06 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -314,7 +314,7 @@ build_section_lists (lang_statement_union_type *statement) /* Final emulation specific call. */ static void -gld${EMULATION_NAME}_finish (void) +ppc_finish (void) { /* e_entry on PowerPC64 points to the function descriptor for _start. If _start is missing, default to the first function @@ -389,6 +389,7 @@ gld${EMULATION_NAME}_finish (void) } ppc64_elf_restore_symbols (&link_info); + gld${EMULATION_NAME}_finish (); } @@ -576,6 +577,6 @@ PARSE_AND_LIST_ARGS_CASES=' # LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation LDEMUL_AFTER_ALLOCATION=gld${EMULATION_NAME}_after_allocation -LDEMUL_FINISH=gld${EMULATION_NAME}_finish +LDEMUL_FINISH=ppc_finish LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=ppc_create_output_section_statements LDEMUL_NEW_VERS_PATTERN=gld${EMULATION_NAME}_new_vers_pattern diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 586c7ebaacc..07d14a388d4 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2005-03-21 Alan Modra + + * ld-powerpc/tlsexe.r: Update. + * ld-powerpc/tlsexetoc.r: Update. + * ld-powerpc/tlsso.r: Update. + * ld-powerpc/tlstocso.r: Update. + 2005-03-20 H.J. Lu * ld-mmix/bpo-1.d: Updated for empty section removal. diff --git a/ld/testsuite/ld-powerpc/tlsexe.r b/ld/testsuite/ld-powerpc/tlsexe.r index 364730ea3a0..4618c0597a3 100644 --- a/ld/testsuite/ld-powerpc/tlsexe.r +++ b/ld/testsuite/ld-powerpc/tlsexe.r @@ -5,7 +5,7 @@ #readelf: -WSsrl #target: powerpc64*-*-* -There are 20 section headers.* +There are 16 section headers.* Section Headers: +\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al @@ -20,15 +20,11 @@ Section Headers: +\[ 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\] \.data +PROGBITS .* 0+ 0+ +WA +0 +0 +1 - +\[12\] \.branch_lt +.* - +\[13\] \.got +PROGBITS .* 0+30 08 +WA +0 +0 +8 - +\[14\] \.sbss +.* - +\[15\] \.plt +.* - +\[16\] \.bss +.* - +\[17\] \.shstrtab +.* - +\[18\] \.symtab +.* - +\[19\] \.strtab +.* + +\[11\] \.got +PROGBITS .* 0+30 08 +WA +0 +0 +8 + +\[12\] \.plt +.* + +\[13\] \.shstrtab +.* + +\[14\] \.symtab +.* + +\[15\] \.strtab +.* #... Elf file type is EXEC \(Executable file\) @@ -76,7 +72,7 @@ Symbol table '\.dynsym' contains 9 entries: .* 0+10010620 +0 NOTYPE +GLOBAL DEFAULT +ABS _edata .* 0+10010650 +0 NOTYPE +GLOBAL DEFAULT +ABS _end -Symbol table '\.symtab' contains 43 entries: +Symbol table '\.symtab' contains 39 entries: +Num: +Value +Size Type +Bind +Vis +Ndx Name .* 0+ +0 NOTYPE +LOCAL +DEFAULT +UND .* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +1 @@ -91,13 +87,9 @@ Symbol table '\.symtab' contains 43 entries: .* 0+100104a0 +0 SECTION LOCAL +DEFAULT +10 .* 0+100105f0 +0 SECTION LOCAL +DEFAULT +11 .* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +12 -.* 0+100105f0 +0 SECTION LOCAL +DEFAULT +13 +.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +13 .* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +14 .* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15 -.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +16 -.* 0+ +0 SECTION LOCAL +DEFAULT +17 -.* 0+ +0 SECTION LOCAL +DEFAULT +18 -.* 0+ +0 SECTION LOCAL +DEFAULT +19 .* 0+ +0 TLS +LOCAL +DEFAULT +8 gd4 .* 0+8 +0 TLS +LOCAL +DEFAULT +8 ld4 .* 0+10 +0 TLS +LOCAL +DEFAULT +8 ld5 diff --git a/ld/testsuite/ld-powerpc/tlsexetoc.r b/ld/testsuite/ld-powerpc/tlsexetoc.r index 1087e420098..777b07a1cf8 100644 --- a/ld/testsuite/ld-powerpc/tlsexetoc.r +++ b/ld/testsuite/ld-powerpc/tlsexetoc.r @@ -5,7 +5,7 @@ #readelf: -WSsrl #target: powerpc64*-*-* -There are 20 section headers.* +There are 16 section headers.* Section Headers: +\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al @@ -20,15 +20,11 @@ Section Headers: +\[ 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\] \.data +PROGBITS .* 0+ 0+ +WA +0 +0 +1 - +\[12\] \.branch_lt +.* - +\[13\] \.got +PROGBITS .* 0+58 08 +WA +0 +0 +8 - +\[14\] \.sbss +.* - +\[15\] \.plt +.* - +\[16\] \.bss +.* - +\[17\] \.shstrtab +.* - +\[18\] \.symtab +.* - +\[19\] \.strtab +.* + +\[11\] \.got +PROGBITS .* 0+58 08 +WA +0 +0 +8 + +\[12\] \.plt +.* + +\[13\] \.shstrtab +.* + +\[14\] \.symtab +.* + +\[15\] \.strtab +.* #... Elf file type is EXEC \(Executable file\) @@ -74,7 +70,7 @@ Symbol table '\.dynsym' contains 8 entries: .* [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _edata .* [0-9a-f]+ +0 NOTYPE +GLOBAL DEFAULT +ABS _end -Symbol table '\.symtab' contains 44 entries: +Symbol table '\.symtab' contains 40 entries: +Num: +Value +Size Type +Bind +Vis +Ndx Name .* 0+ +0 NOTYPE +LOCAL +DEFAULT +UND .* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +1 @@ -89,13 +85,9 @@ Symbol table '\.symtab' contains 44 entries: .* 0+10010430 +0 SECTION LOCAL +DEFAULT +10 .* 0+10010580 +0 SECTION LOCAL +DEFAULT +11 .* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +12 -.* 0+10010580 +0 SECTION LOCAL +DEFAULT +13 +.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +13 .* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +14 .* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15 -.* [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +16 -.* 0+ +0 SECTION LOCAL +DEFAULT +17 -.* 0+ +0 SECTION LOCAL +DEFAULT +18 -.* 0+ +0 SECTION LOCAL +DEFAULT +19 .* 0+ +0 TLS +LOCAL +DEFAULT +8 gd4 .* 0+8 +0 TLS +LOCAL +DEFAULT +8 ld4 .* 0+10 +0 TLS +LOCAL +DEFAULT +8 ld5 @@ -103,7 +95,7 @@ Symbol table '\.symtab' contains 44 entries: .* 0+20 +0 TLS +LOCAL +DEFAULT +8 ie4 .* 0+28 +0 TLS +LOCAL +DEFAULT +8 le4 .* 0+30 +0 TLS +LOCAL +DEFAULT +8 le5 -.* 0+100105d0 +0 NOTYPE +LOCAL +DEFAULT +13 \.Lie0 +.* 0+100105d0 +0 NOTYPE +LOCAL +DEFAULT +11 \.Lie0 .* 0+ +0 FUNC +LOCAL +DEFAULT +UND \.__tls_get_addr .* 0+10010430 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC .* 0+ +0 TLS +GLOBAL DEFAULT +UND gd diff --git a/ld/testsuite/ld-powerpc/tlsso.r b/ld/testsuite/ld-powerpc/tlsso.r index 17faa1e5e00..6912ffae1e2 100644 --- a/ld/testsuite/ld-powerpc/tlsso.r +++ b/ld/testsuite/ld-powerpc/tlsso.r @@ -4,7 +4,7 @@ #readelf: -WSsrl #target: powerpc64*-*-* -There are 19 section headers.* +There are 15 section headers.* Section Headers: +\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al @@ -18,15 +18,11 @@ Section Headers: +\[ 7\] \.tdata +PROGBITS +0+106c8 0+6c8 0+38 0+ WAT +0 +0 +8 +\[ 8\] \.tbss +NOBITS +0+10700 0+700 0+38 0+ WAT +0 +0 +8 +\[ 9\] \.dynamic +DYNAMIC +0+10700 0+700 0+150 10 +WA +3 +0 +8 - +\[10\] \.data +PROGBITS +0+10850 0+850 0+ 0+ +WA +0 +0 +1 - +\[11\] \.branch_lt +.* - +\[12\] \.got +PROGBITS +0+10850 0+850 0+60 08 +WA +0 +0 +8 - +\[13\] \.sbss +.* - +\[14\] \.plt +.* - +\[15\] \.bss +.* - +\[16\] \.shstrtab +.* - +\[17\] \.symtab +.* - +\[18\] \.strtab +.* + +\[10\] \.got +PROGBITS +0+10850 0+850 0+60 08 +WA +0 +0 +8 + +\[11\] \.plt +.* + +\[12\] \.shstrtab +.* + +\[13\] \.symtab +.* + +\[14\] \.strtab +.* #... Elf file type is DYN \(Shared object file\) @@ -76,9 +72,9 @@ Symbol table '\.dynsym' contains 22 entries: +[0-9]+: 0+5c8 +0 SECTION LOCAL +DEFAULT +6 +[0-9]+: 0+106c8 +0 SECTION LOCAL +DEFAULT +7 +[0-9]+: 0+10700 +0 SECTION LOCAL +DEFAULT +8 - +[0-9]+: 0+10850 +0 SECTION LOCAL +DEFAULT +10 - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +11 - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15 + +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND + +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND + +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND +[0-9]+: 0+10700 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND gd +[0-9]+: 0+60 +0 TLS +GLOBAL DEFAULT +8 le0 @@ -95,7 +91,7 @@ Symbol table '\.dynsym' contains 22 entries: +[0-9]+: 0+38 +0 TLS +GLOBAL DEFAULT +8 gd0 +[0-9]+: 0+58 +0 TLS +GLOBAL DEFAULT +8 ie0 -Symbol table '\.symtab' contains 42 entries: +Symbol table '\.symtab' contains 38 entries: +Num: +Value +Size Type +Bind +Vis +Ndx Name +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +1 @@ -112,10 +108,6 @@ Symbol table '\.symtab' contains 42 entries: +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +12 +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +13 +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +14 - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15 - +[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +16 - +[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +17 - +[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +18 +[0-9]+: 0+ +0 TLS +LOCAL +DEFAULT +7 gd4 +[0-9]+: 0+8 +0 TLS +LOCAL +DEFAULT +7 ld4 +[0-9]+: 0+10 +0 TLS +LOCAL +DEFAULT +7 ld5 diff --git a/ld/testsuite/ld-powerpc/tlstocso.r b/ld/testsuite/ld-powerpc/tlstocso.r index 1dc285a45cb..5d87a11a71c 100644 --- a/ld/testsuite/ld-powerpc/tlstocso.r +++ b/ld/testsuite/ld-powerpc/tlstocso.r @@ -4,7 +4,7 @@ #readelf: -WSsrl #target: powerpc64*-*-* -There are 19 section headers.* +There are 15 section headers.* Section Headers: +\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al @@ -18,15 +18,11 @@ Section Headers: +\[ 7\] \.tdata +PROGBITS +0+10610 0+610 0+38 0+ WAT +0 +0 +8 +\[ 8\] \.tbss +NOBITS +0+10648 0+648 0+38 0+ WAT +0 +0 +8 +\[ 9\] \.dynamic +DYNAMIC +0+10648 0+648 0+150 10 +WA +3 +0 +8 - +\[10\] \.data +PROGBITS +0+10798 0+798 0+ 0+ +WA +0 +0 +1 - +\[11\] \.branch_lt +.* - +\[12\] \.got +PROGBITS +0+10798 0+798 0+58 08 +WA +0 +0 +8 - +\[13\] \.sbss +.* - +\[14\] \.plt +.* - +\[15\] \.bss +.* - +\[16\] \.shstrtab +.* - +\[17\] \.symtab +.* - +\[18\] \.strtab +.* + +\[10\] \.got +PROGBITS +0+10798 0+798 0+58 08 +WA +0 +0 +8 + +\[11\] \.plt +.* + +\[12\] \.shstrtab +.* + +\[13\] \.symtab +.* + +\[14\] \.strtab +.* #... Elf file type is DYN \(Shared object file\) @@ -71,9 +67,9 @@ Symbol table '\.dynsym' contains 22 entries: +[0-9]+: 0+550 +0 SECTION LOCAL +DEFAULT +6 +[0-9]+: 0+10610 +0 SECTION LOCAL +DEFAULT +7 +[0-9]+: 0+10648 +0 SECTION LOCAL +DEFAULT +8 - +[0-9]+: 0+10798 +0 SECTION LOCAL +DEFAULT +10 - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +11 - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15 + +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND + +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND + +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND +[0-9]+: 0+10648 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND gd +[0-9]+: 0+60 +0 TLS +GLOBAL DEFAULT +8 le0 @@ -90,7 +86,7 @@ Symbol table '\.dynsym' contains 22 entries: +[0-9]+: 0+38 +0 TLS +GLOBAL DEFAULT +8 gd0 +[0-9]+: 0+58 +0 TLS +GLOBAL DEFAULT +8 ie0 -Symbol table '\.symtab' contains 43 entries: +Symbol table '\.symtab' contains 39 entries: +Num: +Value +Size Type +Bind +Vis +Ndx Name +[0-9]+: 0+ +0 NOTYPE +LOCAL +DEFAULT +UND +[0-9]+: 0+120 +0 SECTION LOCAL +DEFAULT +1 @@ -107,10 +103,6 @@ Symbol table '\.symtab' contains 43 entries: +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +12 +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +13 +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +14 - +[0-9]+: [0-9a-f]+ +0 SECTION LOCAL +DEFAULT +15 - +[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +16 - +[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +17 - +[0-9]+: 0+ +0 SECTION LOCAL +DEFAULT +18 +[0-9]+: 0+ +0 TLS +LOCAL +DEFAULT +7 gd4 +[0-9]+: 0+8 +0 TLS +LOCAL +DEFAULT +7 ld4 +[0-9]+: 0+10 +0 TLS +LOCAL +DEFAULT +7 ld5 @@ -118,7 +110,7 @@ Symbol table '\.symtab' contains 43 entries: +[0-9]+: 0+20 +0 TLS +LOCAL +DEFAULT +7 ie4 +[0-9]+: 0+28 +0 TLS +LOCAL +DEFAULT +7 le4 +[0-9]+: 0+30 +0 TLS +LOCAL +DEFAULT +7 le5 - +[0-9]+: [0-9a-f]+ +0 NOTYPE +LOCAL +DEFAULT +12 \.Lie0 + +[0-9]+: [0-9a-f]+ +0 NOTYPE +LOCAL +DEFAULT +10 \.Lie0 +[0-9]+: [0-9a-f]+ +0 NOTYPE +LOCAL +DEFAULT +6 \.__tls_get_addr +[0-9]+: 0+10648 +0 OBJECT +GLOBAL DEFAULT +ABS _DYNAMIC +[0-9]+: 0+ +0 TLS +GLOBAL DEFAULT +UND gd