aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2013-10-29 17:52:24 +0100
committerJan Beulich <jbeulich@suse.com>2013-10-29 17:52:24 +0100
commit34a79995c4cc34f6f41e2a4b2df477db31b31f0c (patch)
treef85f8514b04cea06e4f013d80b869ec140dce61a
parentaee17e424f491173bb377b97c397bca1604bf5b8 (diff)
downloadgdb-34a79995c4cc34f6f41e2a4b2df477db31b31f0c.zip
gdb-34a79995c4cc34f6f41e2a4b2df477db31b31f0c.tar.gz
gdb-34a79995c4cc34f6f41e2a4b2df477db31b31f0c.tar.bz2
ld/ELF: refine fake STT_FILE symbol emission
There's no real need to emit these always: They're needed only if we indeed want to emit a localized symbol. Hence defer emission until we at least did the basic early checks that would lead to no such symbol getting emitted. This in particular avoids emitting such a symbol in the majority of (if not all) "ld -r" cases. I hope my set of cross build tests caught all the test cases needing adjustment - please forgive if I missed a few. bfd/ 2013-10-29 Jan Beulich <jbeulich@suse.com> * elflink.c (struct elf_outext_info): Add field file_sym_done. (bfd_elf_final_link): Initialize new field. Move fake STT_FILE symbol emission from here ... (elf_link_output_extsym): ... to here. gas/testsuite/ 2013-10-29 Jan Beulich <jbeulich@suse.com> * gas/microblaze/relax_size.elf: Drop expectation of no longer present STT_FILE symbol. * gas/microblaze/relax_size2.elf: Likewise. ld/testsuite/ 2013-10-29 Jan Beulich <jbeulich@suse.com> * ld-cris/tls-e-tpoffcomm1.d: Drop expectation of no longer present STT_FILE symbol. * ld-mmix/bpo-18.d: Likewise. * ld-mmix/bpo-22.d: Likewise. * ld-mmix/greg-6.d: Likewise. * ld-mmix/greg-7.d: Likewise. * ld-mmix/loc4.d: Likewise. * ld-mmix/local1.d: Likewise. * ld-mmix/local3.d: Likewise. * ld-mmix/local5.d: Likewise. * ld-mmix/local7.d: Likewise. * ld-mmix/loct-1.d: Likewise. * ld-sh/sh64/abi32.xd: Likewise. * ld-sh/sh64/abi64.xd: Likewise. * ld-sh/sh64/cmpct1.xd: Likewise. * ld-sh/sh64/crange1.rd: Likewise. * ld-sh/sh64/crange2.rd: Likewise. * ld-sh/sh64/crange3-cmpct.rd: Likewise. * ld-sh/sh64/crange3-media.rd: Likewise. * ld-sh/sh64/crange3.rd: Likewise. * ld-sh/sh64/crangerel1.rd: Likewise. * ld-sh/sh64/crangerel2.rd: Likewise. * ld-sh/sh64/mix1.xd: Likewise. * ld-sh/sh64/mix2.xd: Likewise. * ld-sh/sh64/shdl32.xd: Likewise. * ld-sh/sh64/shdl64.xd: Likewise.
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elflink.c34
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/microblaze/relax_size.elf47
-rw-r--r--gas/testsuite/gas/microblaze/relax_size2.elf47
-rw-r--r--ld/testsuite/ChangeLog29
-rw-r--r--ld/testsuite/ld-cris/tls-e-tpoffcomm1.d1
-rw-r--r--ld/testsuite/ld-mmix/bpo-18.d1
-rw-r--r--ld/testsuite/ld-mmix/bpo-22.d1
-rw-r--r--ld/testsuite/ld-mmix/greg-6.d1
-rw-r--r--ld/testsuite/ld-mmix/greg-7.d1
-rw-r--r--ld/testsuite/ld-mmix/loc4.d1
-rw-r--r--ld/testsuite/ld-mmix/local1.d1
-rw-r--r--ld/testsuite/ld-mmix/local3.d1
-rw-r--r--ld/testsuite/ld-mmix/local5.d1
-rw-r--r--ld/testsuite/ld-mmix/local7.d1
-rw-r--r--ld/testsuite/ld-mmix/loct-1.d1
-rw-r--r--ld/testsuite/ld-sh/sh64/abi32.xd1
-rw-r--r--ld/testsuite/ld-sh/sh64/abi64.xd1
-rw-r--r--ld/testsuite/ld-sh/sh64/cmpct1.xd1
-rw-r--r--ld/testsuite/ld-sh/sh64/crange1.rd1
-rw-r--r--ld/testsuite/ld-sh/sh64/crange2.rd1
-rw-r--r--ld/testsuite/ld-sh/sh64/crange3-cmpct.rd1
-rw-r--r--ld/testsuite/ld-sh/sh64/crange3-media.rd1
-rw-r--r--ld/testsuite/ld-sh/sh64/crange3.rd1
-rw-r--r--ld/testsuite/ld-sh/sh64/crangerel1.rd1
-rw-r--r--ld/testsuite/ld-sh/sh64/crangerel2.rd1
-rw-r--r--ld/testsuite/ld-sh/sh64/mix1.xd1
-rw-r--r--ld/testsuite/ld-sh/sh64/mix2.xd1
-rw-r--r--ld/testsuite/ld-sh/sh64/shdl32.xd1
-rw-r--r--ld/testsuite/ld-sh/sh64/shdl64.xd1
31 files changed, 106 insertions, 89 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 85dc5ed..bc240ce 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2013-10-29 Jan Beulich <jbeulich@suse.com>
+
+ * elflink.c (struct elf_outext_info): Add field file_sym_done.
+ (bfd_elf_final_link): Initialize new field. Move fake STT_FILE
+ symbol emission from here ...
+ (elf_link_output_extsym): ... to here.
+
2013-10-24 Nick Clifton <nickc@redhat.com>
PR binutils/15994
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 99b7ca1..1e6abd9 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -7460,6 +7460,7 @@ struct elf_outext_info
bfd_boolean localsyms;
bfd_boolean need_second_pass;
bfd_boolean second_pass;
+ bfd_boolean file_sym_done;
struct elf_final_link_info *flinfo;
};
@@ -8678,6 +8679,22 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data)
|| h->root.type == bfd_link_hash_defweak)
&& h->root.u.def.section->output_section != NULL))
return TRUE;
+
+ if (!eoinfo->file_sym_done
+ && (eoinfo->second_pass ? eoinfo->flinfo->filesym_count == 1
+ : eoinfo->flinfo->filesym_count > 1))
+ {
+ /* Output a FILE symbol so that following locals are not associated
+ with the wrong input file. */
+ memset (&sym, 0, sizeof (sym));
+ sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_FILE);
+ sym.st_shndx = SHN_ABS;
+ if (!elf_link_output_sym (eoinfo->flinfo, NULL, &sym,
+ bfd_und_section_ptr, NULL))
+ return FALSE;
+
+ eoinfo->file_sym_done = TRUE;
+ }
}
else
{
@@ -10962,17 +10979,6 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
}
}
- /* Output a FILE symbol so that following locals are not associated
- with the wrong input file. */
- memset (&elfsym, 0, sizeof (elfsym));
- elfsym.st_info = ELF_ST_INFO (STB_LOCAL, STT_FILE);
- elfsym.st_shndx = SHN_ABS;
-
- if (flinfo.filesym_count > 1
- && !elf_link_output_sym (&flinfo, NULL, &elfsym,
- bfd_und_section_ptr, NULL))
- return FALSE;
-
/* Output any global symbols that got converted to local in a
version script or due to symbol visibility. We do this in a
separate step since ELF requires all local symbols to appear
@@ -10984,15 +10990,11 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
eoinfo.localsyms = TRUE;
eoinfo.need_second_pass = FALSE;
eoinfo.second_pass = FALSE;
+ eoinfo.file_sym_done = FALSE;
bfd_hash_traverse (&info->hash->table, elf_link_output_extsym, &eoinfo);
if (eoinfo.failed)
return FALSE;
- if (flinfo.filesym_count == 1
- && !elf_link_output_sym (&flinfo, NULL, &elfsym,
- bfd_und_section_ptr, NULL))
- return FALSE;
-
if (eoinfo.need_second_pass)
{
eoinfo.second_pass = TRUE;
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index da0afe8..f7cd119 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2013-10-29 Jan Beulich <jbeulich@suse.com>
+
+ * gas/microblaze/relax_size.elf: Drop expectation of no longer
+ present STT_FILE symbol.
+ * gas/microblaze/relax_size2.elf: Likewise.
+
2013-10-18 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
* gas/mips/micromips@msa-branch.d, gas/mips/msa-branch.d,
diff --git a/gas/testsuite/gas/microblaze/relax_size.elf b/gas/testsuite/gas/microblaze/relax_size.elf
index cf23ea6..9a96959 100644
--- a/gas/testsuite/gas/microblaze/relax_size.elf
+++ b/gas/testsuite/gas/microblaze/relax_size.elf
@@ -1,5 +1,5 @@
-Symbol table '.symtab' contains 29 entries:
+Symbol table '.symtab' contains 28 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000050 0 SECTION LOCAL DEFAULT 1
@@ -7,26 +7,25 @@ Symbol table '.symtab' contains 29 entries:
3: 00000000 0 FILE LOCAL DEFAULT ABS relax_size.o
4: 00000050 8 NOTYPE LOCAL DEFAULT 1 func
5: 00000058 0 NOTYPE LOCAL DEFAULT 1 label
- 6: 00000000 0 FILE LOCAL DEFAULT ABS
- 7: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _fdata
- 8: 00000058 0 NOTYPE GLOBAL DEFAULT 1 _etext
- 9: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _essrw
- 10: 00000058 0 NOTYPE GLOBAL DEFAULT 1 _heap_end
- 11: 00000058 0 NOTYPE GLOBAL DEFAULT 1 _heap_start
- 12: 00000000 0 NOTYPE GLOBAL DEFAULT ABS _ssro_size
- 13: 00000050 0 NOTYPE GLOBAL DEFAULT 1 _ftext
- 14: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _essro
- 15: 00000400 0 NOTYPE GLOBAL DEFAULT ABS _STACK_SIZE
- 16: 00000000 0 NOTYPE GLOBAL DEFAULT ABS _HEAP_SIZE
- 17: 00000000 0 NOTYPE GLOBAL DEFAULT ABS _ssrw_size
- 18: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _stack_end
- 19: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _edata
- 20: 00000458 0 NOTYPE GLOBAL DEFAULT 2 _end
- 21: 00000058 0 NOTYPE GLOBAL DEFAULT 1 _heap
- 22: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _ssro
- 23: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _ssrw
- 24: 00000458 0 NOTYPE GLOBAL DEFAULT 2 _stack
- 25: 00000050 0 NOTYPE GLOBAL DEFAULT ABS _TEXT_START_ADDR
- 26: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _frodata
- 27: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _fbss
- 28: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _erodata
+ 6: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _fdata
+ 7: 00000058 0 NOTYPE GLOBAL DEFAULT 1 _etext
+ 8: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _essrw
+ 9: 00000058 0 NOTYPE GLOBAL DEFAULT 1 _heap_end
+ 10: 00000058 0 NOTYPE GLOBAL DEFAULT 1 _heap_start
+ 11: 00000000 0 NOTYPE GLOBAL DEFAULT ABS _ssro_size
+ 12: 00000050 0 NOTYPE GLOBAL DEFAULT 1 _ftext
+ 13: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _essro
+ 14: 00000400 0 NOTYPE GLOBAL DEFAULT ABS _STACK_SIZE
+ 15: 00000000 0 NOTYPE GLOBAL DEFAULT ABS _HEAP_SIZE
+ 16: 00000000 0 NOTYPE GLOBAL DEFAULT ABS _ssrw_size
+ 17: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _stack_end
+ 18: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _edata
+ 19: 00000458 0 NOTYPE GLOBAL DEFAULT 2 _end
+ 20: 00000058 0 NOTYPE GLOBAL DEFAULT 1 _heap
+ 21: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _ssro
+ 22: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _ssrw
+ 23: 00000458 0 NOTYPE GLOBAL DEFAULT 2 _stack
+ 24: 00000050 0 NOTYPE GLOBAL DEFAULT ABS _TEXT_START_ADDR
+ 25: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _frodata
+ 26: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _fbss
+ 27: 00000058 0 NOTYPE GLOBAL DEFAULT 2 _erodata
diff --git a/gas/testsuite/gas/microblaze/relax_size2.elf b/gas/testsuite/gas/microblaze/relax_size2.elf
index fbdcc0a..2376bfcd2 100644
--- a/gas/testsuite/gas/microblaze/relax_size2.elf
+++ b/gas/testsuite/gas/microblaze/relax_size2.elf
@@ -1,5 +1,5 @@
-Symbol table '.symtab' contains 31 entries:
+Symbol table '.symtab' contains 30 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000050 0 SECTION LOCAL DEFAULT 1
@@ -9,26 +9,25 @@ Symbol table '.symtab' contains 31 entries:
5: 00000054 0 NOTYPE LOCAL DEFAULT 1 label
6: 00000054 8 NOTYPE LOCAL DEFAULT 1 func2
7: 0000005c 0 NOTYPE LOCAL DEFAULT 1 label2
- 8: 00000000 0 FILE LOCAL DEFAULT ABS
- 9: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _fdata
- 10: 0000005c 0 NOTYPE GLOBAL DEFAULT 1 _etext
- 11: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _essrw
- 12: 00000060 0 NOTYPE GLOBAL DEFAULT 1 _heap_end
- 13: 00000060 0 NOTYPE GLOBAL DEFAULT 1 _heap_start
- 14: 00000000 0 NOTYPE GLOBAL DEFAULT ABS _ssro_size
- 15: 00000050 0 NOTYPE GLOBAL DEFAULT 1 _ftext
- 16: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _essro
- 17: 00000400 0 NOTYPE GLOBAL DEFAULT ABS _STACK_SIZE
- 18: 00000000 0 NOTYPE GLOBAL DEFAULT ABS _HEAP_SIZE
- 19: 00000000 0 NOTYPE GLOBAL DEFAULT ABS _ssrw_size
- 20: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _stack_end
- 21: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _edata
- 22: 00000460 0 NOTYPE GLOBAL DEFAULT 2 _end
- 23: 00000060 0 NOTYPE GLOBAL DEFAULT 1 _heap
- 24: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _ssro
- 25: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _ssrw
- 26: 00000460 0 NOTYPE GLOBAL DEFAULT 2 _stack
- 27: 00000050 0 NOTYPE GLOBAL DEFAULT ABS _TEXT_START_ADDR
- 28: 0000005c 0 NOTYPE GLOBAL DEFAULT 2 _frodata
- 29: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _fbss
- 30: 0000005c 0 NOTYPE GLOBAL DEFAULT 2 _erodata
+ 8: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _fdata
+ 9: 0000005c 0 NOTYPE GLOBAL DEFAULT 1 _etext
+ 10: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _essrw
+ 11: 00000060 0 NOTYPE GLOBAL DEFAULT 1 _heap_end
+ 12: 00000060 0 NOTYPE GLOBAL DEFAULT 1 _heap_start
+ 13: 00000000 0 NOTYPE GLOBAL DEFAULT ABS _ssro_size
+ 14: 00000050 0 NOTYPE GLOBAL DEFAULT 1 _ftext
+ 15: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _essro
+ 16: 00000400 0 NOTYPE GLOBAL DEFAULT ABS _STACK_SIZE
+ 17: 00000000 0 NOTYPE GLOBAL DEFAULT ABS _HEAP_SIZE
+ 18: 00000000 0 NOTYPE GLOBAL DEFAULT ABS _ssrw_size
+ 19: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _stack_end
+ 20: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _edata
+ 21: 00000460 0 NOTYPE GLOBAL DEFAULT 2 _end
+ 22: 00000060 0 NOTYPE GLOBAL DEFAULT 1 _heap
+ 23: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _ssro
+ 24: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _ssrw
+ 25: 00000460 0 NOTYPE GLOBAL DEFAULT 2 _stack
+ 26: 00000050 0 NOTYPE GLOBAL DEFAULT ABS _TEXT_START_ADDR
+ 27: 0000005c 0 NOTYPE GLOBAL DEFAULT 2 _frodata
+ 28: 00000060 0 NOTYPE GLOBAL DEFAULT 2 _fbss
+ 29: 0000005c 0 NOTYPE GLOBAL DEFAULT 2 _erodata
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 788a8e7..2042728 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,32 @@
+2013-10-29 Jan Beulich <jbeulich@suse.com>
+
+ * ld-cris/tls-e-tpoffcomm1.d: Drop expectation of no longer
+ present STT_FILE symbol.
+ * ld-mmix/bpo-18.d: Likewise.
+ * ld-mmix/bpo-22.d: Likewise.
+ * ld-mmix/greg-6.d: Likewise.
+ * ld-mmix/greg-7.d: Likewise.
+ * ld-mmix/loc4.d: Likewise.
+ * ld-mmix/local1.d: Likewise.
+ * ld-mmix/local3.d: Likewise.
+ * ld-mmix/local5.d: Likewise.
+ * ld-mmix/local7.d: Likewise.
+ * ld-mmix/loct-1.d: Likewise.
+ * ld-sh/sh64/abi32.xd: Likewise.
+ * ld-sh/sh64/abi64.xd: Likewise.
+ * ld-sh/sh64/cmpct1.xd: Likewise.
+ * ld-sh/sh64/crange1.rd: Likewise.
+ * ld-sh/sh64/crange2.rd: Likewise.
+ * ld-sh/sh64/crange3-cmpct.rd: Likewise.
+ * ld-sh/sh64/crange3-media.rd: Likewise.
+ * ld-sh/sh64/crange3.rd: Likewise.
+ * ld-sh/sh64/crangerel1.rd: Likewise.
+ * ld-sh/sh64/crangerel2.rd: Likewise.
+ * ld-sh/sh64/mix1.xd: Likewise.
+ * ld-sh/sh64/mix2.xd: Likewise.
+ * ld-sh/sh64/shdl32.xd: Likewise.
+ * ld-sh/sh64/shdl64.xd: Likewise.
+
2013-10-18 Hans-Peter Nilsson <hp@axis.com>
* ld-cris/asneed1.d: New test.
diff --git a/ld/testsuite/ld-cris/tls-e-tpoffcomm1.d b/ld/testsuite/ld-cris/tls-e-tpoffcomm1.d
index b1f39ec..4fc067e 100644
--- a/ld/testsuite/ld-cris/tls-e-tpoffcomm1.d
+++ b/ld/testsuite/ld-cris/tls-e-tpoffcomm1.d
@@ -27,7 +27,6 @@ SYMBOL TABLE:
0+82084 l d \.tbss 0+ \.tbss
0+ l df \*ABS\* 0+ .*
0+80078 l F \.text 0+c do_test
-0+ l df \*ABS\* 0+ .*
0+80074 g \.text 0+ _start
0+82084 g \.text 0+ __bss_start
0+ g \.tbss 0+4 foo
diff --git a/ld/testsuite/ld-mmix/bpo-18.d b/ld/testsuite/ld-mmix/bpo-18.d
index 7e06fae..1f24f60 100644
--- a/ld/testsuite/ld-mmix/bpo-18.d
+++ b/ld/testsuite/ld-mmix/bpo-18.d
@@ -15,7 +15,6 @@ SYMBOL TABLE:
0+7e0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
0+ l df \*ABS\* 0+ .*
4000000000001064 l \.text\.away 0+ x
-0+ l df \*ABS\* 0+ .*
0+100 g \.text 0+ x
4000000000001060 g \.text\.away 0+ Main
0+104 g \.text 0+ x2
diff --git a/ld/testsuite/ld-mmix/bpo-22.d b/ld/testsuite/ld-mmix/bpo-22.d
index 127b489..e034b0a 100644
--- a/ld/testsuite/ld-mmix/bpo-22.d
+++ b/ld/testsuite/ld-mmix/bpo-22.d
@@ -14,7 +14,6 @@ SYMBOL TABLE:
0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
0+ l df \*ABS\* 0+ .*
0+4 l \.text 0+ x
-0+ l df \*ABS\* 0+ .*
0+ g \.text 0+ Main
0+ g \.text 0+ _start
diff --git a/ld/testsuite/ld-mmix/greg-6.d b/ld/testsuite/ld-mmix/greg-6.d
index d8157f7..4327952 100644
--- a/ld/testsuite/ld-mmix/greg-6.d
+++ b/ld/testsuite/ld-mmix/greg-6.d
@@ -290,7 +290,6 @@ SYMBOL TABLE:
0+fc l \*REG\* 0+ lsym
0+ l df \*ABS\* 0+ .*
0+fd l \*REG\* 0+ lsym
-0+ l df \*ABS\* 0+ .*
0+14 g \.text 0+ _start
0+fe g \*REG\* 0+ areg
2000000000000000 g \.text 0+ __bss_start
diff --git a/ld/testsuite/ld-mmix/greg-7.d b/ld/testsuite/ld-mmix/greg-7.d
index 57df901..3afd3ab 100644
--- a/ld/testsuite/ld-mmix/greg-7.d
+++ b/ld/testsuite/ld-mmix/greg-7.d
@@ -290,7 +290,6 @@ SYMBOL TABLE:
0+fd l \*REG\* 0+ lsym
0+ l df \*ABS\* 0+ .*
0+fe l \*REG\* 0+ lsym
-0+ l df \*ABS\* 0+ .*
0+14 g \.text 0+ _start
0+20 g \*REG\* 0+ areg
2000000000000000 g \.text 0+ __bss_start
diff --git a/ld/testsuite/ld-mmix/loc4.d b/ld/testsuite/ld-mmix/loc4.d
index dccfb76..6b93658 100644
--- a/ld/testsuite/ld-mmix/loc4.d
+++ b/ld/testsuite/ld-mmix/loc4.d
@@ -13,7 +13,6 @@ SYMBOL TABLE:
2000000000000000 l d \.data 0+ (|\.data)
0+ l df \*ABS\* 0+ .*
2000000000000000 l \.data 0+ xx
-0+ l df \*ABS\* 0+ .*
0+1004 g F \.text 0+ Main
2000000000000000 g \*ABS\* 0+ __\.MMIX\.start\.\.data
0+1004 g \.text 0+ _start
diff --git a/ld/testsuite/ld-mmix/local1.d b/ld/testsuite/ld-mmix/local1.d
index 8252971..31caa1c 100644
--- a/ld/testsuite/ld-mmix/local1.d
+++ b/ld/testsuite/ld-mmix/local1.d
@@ -39,7 +39,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* 0+fd +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fe +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
-.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +PRC\[0xff00\] ext1
.* 0+4 +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
#...
diff --git a/ld/testsuite/ld-mmix/local3.d b/ld/testsuite/ld-mmix/local3.d
index c559ec2..837633c 100644
--- a/ld/testsuite/ld-mmix/local3.d
+++ b/ld/testsuite/ld-mmix/local3.d
@@ -37,7 +37,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* 0+fd +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fe +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
-.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +ABS ext1
.* 0+4 +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
#...
diff --git a/ld/testsuite/ld-mmix/local5.d b/ld/testsuite/ld-mmix/local5.d
index 802f282..3beba4e 100644
--- a/ld/testsuite/ld-mmix/local5.d
+++ b/ld/testsuite/ld-mmix/local5.d
@@ -38,7 +38,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* 0+fd +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fe +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
-.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +PRC\[0xff00\] ext1
.* 0+8 +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
#...
diff --git a/ld/testsuite/ld-mmix/local7.d b/ld/testsuite/ld-mmix/local7.d
index 7a5847b..b4653fd 100644
--- a/ld/testsuite/ld-mmix/local7.d
+++ b/ld/testsuite/ld-mmix/local7.d
@@ -39,7 +39,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* 0+fd +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fe +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
-.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +ABS ext1
.* 0+8 +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
#...
diff --git a/ld/testsuite/ld-mmix/loct-1.d b/ld/testsuite/ld-mmix/loct-1.d
index 853b065..a0b38d4 100644
--- a/ld/testsuite/ld-mmix/loct-1.d
+++ b/ld/testsuite/ld-mmix/loct-1.d
@@ -9,7 +9,6 @@ SYMBOL TABLE:
0+1004 l d \.text 0+ (|\.text)
0+ l df \*ABS\* 0+ .*
0+1004 l \.text 0+ t
-0+ l df \*ABS\* 0+ .*
0+100c g \.text 0+ _start
0+1004 g \*ABS\* 0+ __\.MMIX\.start\.\.text
2000000000000000 g \.text 0+ __bss_start
diff --git a/ld/testsuite/ld-sh/sh64/abi32.xd b/ld/testsuite/ld-sh/sh64/abi32.xd
index f451b81..695ea4e 100644
--- a/ld/testsuite/ld-sh/sh64/abi32.xd
+++ b/ld/testsuite/ld-sh/sh64/abi32.xd
@@ -30,7 +30,6 @@ SYMBOL TABLE:
0+ l df \*ABS\* 0+ .*
0+10fc l \.data 0+ foobar2
0+1060 l \.text 0+ 0x04 plugh
-0+ l df \*ABS\* 0+ .*
0+10f8 g \.data 0+ foobar
0+10e8 g \.data 0+ baz
0+10e8 g .* 0+ ___dtors
diff --git a/ld/testsuite/ld-sh/sh64/abi64.xd b/ld/testsuite/ld-sh/sh64/abi64.xd
index 7018739..13bb333 100644
--- a/ld/testsuite/ld-sh/sh64/abi64.xd
+++ b/ld/testsuite/ld-sh/sh64/abi64.xd
@@ -29,7 +29,6 @@ SYMBOL TABLE:
0000000000000000 l df \*ABS\* 0000000000000000 .*
0000000000001144 l \.data 0000000000000000 foobar2
00000000000010a8 l \.text 0000000000000000 0x04 plugh
-0000000000000000 l df \*ABS\* 0000000000000000 .*
0000000000001140 g \.data 0000000000000000 foobar
0000000000001130 g \.data 0000000000000000 baz
0000000000001130 g .* 0000000000000000 ___dtors
diff --git a/ld/testsuite/ld-sh/sh64/cmpct1.xd b/ld/testsuite/ld-sh/sh64/cmpct1.xd
index b32f820..77e6e84 100644
--- a/ld/testsuite/ld-sh/sh64/cmpct1.xd
+++ b/ld/testsuite/ld-sh/sh64/cmpct1.xd
@@ -26,7 +26,6 @@ SYMBOL TABLE:
0+ l df \*ABS\* 0+ .*
0+1004 l \.text 0+ next
0+100c l \.rodata 0+ here
-0+ l df \*ABS\* 0+ .*
0+1098 g .* 0+ ___dtors
0+1098 g \.rodata 0+ __bss_start
0+1098 g .* 0+ ___ctors_end
diff --git a/ld/testsuite/ld-sh/sh64/crange1.rd b/ld/testsuite/ld-sh/sh64/crange1.rd
index 10cd3b3..e22d502 100644
--- a/ld/testsuite/ld-sh/sh64/crange1.rd
+++ b/ld/testsuite/ld-sh/sh64/crange1.rd
@@ -24,7 +24,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.*: 00000000 +0 +SECTION +LOCAL +DEFAULT +4
.* FILE +LOCAL +DEFAULT +ABS .*
.*: 00001004 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2
-.* FILE +LOCAL +DEFAULT +ABS .*
.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors
.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +2 __bss_start
.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors_end
diff --git a/ld/testsuite/ld-sh/sh64/crange2.rd b/ld/testsuite/ld-sh/sh64/crange2.rd
index 131712c..5074087 100644
--- a/ld/testsuite/ld-sh/sh64/crange2.rd
+++ b/ld/testsuite/ld-sh/sh64/crange2.rd
@@ -29,7 +29,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.*: 0000102c +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 sec2
.*: 00001040 +0 +NOTYPE +LOCAL +DEFAULT +2 sec3
.*: 00001048 +0 +NOTYPE +LOCAL +DEFAULT +2 sec4
-.* FILE +LOCAL +DEFAULT +ABS .*
.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors
.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +2 __bss_start
.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors_end
diff --git a/ld/testsuite/ld-sh/sh64/crange3-cmpct.rd b/ld/testsuite/ld-sh/sh64/crange3-cmpct.rd
index c00366a..cfd0b5a 100644
--- a/ld/testsuite/ld-sh/sh64/crange3-cmpct.rd
+++ b/ld/testsuite/ld-sh/sh64/crange3-cmpct.rd
@@ -45,7 +45,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.*: 000010a4 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2
.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
.*: 000010bc +0 +NOTYPE +LOCAL +DEFAULT +2 sec3
-.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
.*: 000010c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +2 diversion
.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors
.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +2 __bss_start
diff --git a/ld/testsuite/ld-sh/sh64/crange3-media.rd b/ld/testsuite/ld-sh/sh64/crange3-media.rd
index 52d4d00..8490219 100644
--- a/ld/testsuite/ld-sh/sh64/crange3-media.rd
+++ b/ld/testsuite/ld-sh/sh64/crange3-media.rd
@@ -45,7 +45,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.*: 000010a4 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2
.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
.*: 000010bc +0 +NOTYPE +LOCAL +DEFAULT +2 sec3
-.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
.*: 000010c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +2 diversion
.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors
.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +2 __bss_start
diff --git a/ld/testsuite/ld-sh/sh64/crange3.rd b/ld/testsuite/ld-sh/sh64/crange3.rd
index 817f8f6..b495861 100644
--- a/ld/testsuite/ld-sh/sh64/crange3.rd
+++ b/ld/testsuite/ld-sh/sh64/crange3.rd
@@ -26,7 +26,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.*: 000010a4 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2
.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
.*: 000010bc +0 +NOTYPE +LOCAL +DEFAULT +2 sec3
-.*: 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
.*: 000010c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +2 diversion
.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors
.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +2 __bss_start
diff --git a/ld/testsuite/ld-sh/sh64/crangerel1.rd b/ld/testsuite/ld-sh/sh64/crangerel1.rd
index 8dd642e..1a9ce2f 100644
--- a/ld/testsuite/ld-sh/sh64/crangerel1.rd
+++ b/ld/testsuite/ld-sh/sh64/crangerel1.rd
@@ -33,7 +33,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* 00000000 +0 +SECTION +LOCAL +DEFAULT +6
.* 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 00000000 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2
-.* 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2
Hex dump of section '\.text\.mixed':
diff --git a/ld/testsuite/ld-sh/sh64/crangerel2.rd b/ld/testsuite/ld-sh/sh64/crangerel2.rd
index 5b3227b..81c3942 100644
--- a/ld/testsuite/ld-sh/sh64/crangerel2.rd
+++ b/ld/testsuite/ld-sh/sh64/crangerel2.rd
@@ -44,7 +44,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* 0000003c +0 +NOTYPE +LOCAL +DEFAULT +2 sec3
.* 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 00000044 +0 +NOTYPE +LOCAL +DEFAULT +2 sec4
-.* 00000000 +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2
Hex dump of section '\.text\.mixed':
diff --git a/ld/testsuite/ld-sh/sh64/mix1.xd b/ld/testsuite/ld-sh/sh64/mix1.xd
index 5011676..479ff3e 100644
--- a/ld/testsuite/ld-sh/sh64/mix1.xd
+++ b/ld/testsuite/ld-sh/sh64/mix1.xd
@@ -32,7 +32,6 @@ SYMBOL TABLE:
0+1004 l \.text 0+ start2
0+1030 l \.text 0+ 0x04 mediacode2
0+1018 l \.text 0+ 0x04 mediacode
-0+ l df \*ABS\* 0+ .*
0+10c8 g .* 0+ ___dtors
0+10d8 g \.data 0+ __bss_start
0+10c8 g .* 0+ ___ctors_end
diff --git a/ld/testsuite/ld-sh/sh64/mix2.xd b/ld/testsuite/ld-sh/sh64/mix2.xd
index ddd0632..518e67e 100644
--- a/ld/testsuite/ld-sh/sh64/mix2.xd
+++ b/ld/testsuite/ld-sh/sh64/mix2.xd
@@ -33,7 +33,6 @@ SYMBOL TABLE:
0+ l d \.cranges 0+ (|\.cranges)
0+ l df \*ABS\* 0+ .*
0+1020 l \.text 0+ locallabel
-0+ l df \*ABS\* 0+ .*
0+1040 g \.rodata 0+ compactlabel4
0+101c g \.text 0+ 0x04 medialabel2
0+1038 g \.rodata 0+ medialabel3
diff --git a/ld/testsuite/ld-sh/sh64/shdl32.xd b/ld/testsuite/ld-sh/sh64/shdl32.xd
index 8606b6f..d9c2364 100644
--- a/ld/testsuite/ld-sh/sh64/shdl32.xd
+++ b/ld/testsuite/ld-sh/sh64/shdl32.xd
@@ -29,7 +29,6 @@ SYMBOL TABLE:
0+80000 l d \.stack 0+ (|\.stack)
0+ l df \*ABS\* 0+ .*
0+1150 l \.text 0+ 0x04 part2
-0+ l df \*ABS\* 0+ .*
0+13f8 g \.data 0+ dfoo_otherboth2
0+1178 g \.text 0+ 0x04 bar_otherwithout
0+11b4 g \.text 0+ 0x04 bazwithout
diff --git a/ld/testsuite/ld-sh/sh64/shdl64.xd b/ld/testsuite/ld-sh/sh64/shdl64.xd
index 47f35a7..6e2c41c 100644
--- a/ld/testsuite/ld-sh/sh64/shdl64.xd
+++ b/ld/testsuite/ld-sh/sh64/shdl64.xd
@@ -29,7 +29,6 @@ SYMBOL TABLE:
0+80000 l d \.stack 0+ (|\.stack)
0+ l df \*ABS\* 0+ .*
0+1150 l \.text 0+ 0x04 part2
-0+ l df \*ABS\* 0+ .*
0+13f8 g \.data 0+ dfoo_otherboth2
0+1178 g \.text 0+ 0x04 bar_otherwithout
0+11b4 g \.text 0+ 0x04 bazwithout