aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2003-06-27 01:16:30 +0000
committerThiemo Seufer <ths@networkno.de>2003-06-27 01:16:30 +0000
commit7a79a000c157a9dd4560ddbc71565cb3bef3520a (patch)
treec3ce2c82443b3e26e7b03139d27ba557063daf4c
parent0c7a8e5acd399d1d36dbe0cda815844dd5308c10 (diff)
downloadgdb-7a79a000c157a9dd4560ddbc71565cb3bef3520a.zip
gdb-7a79a000c157a9dd4560ddbc71565cb3bef3520a.tar.gz
gdb-7a79a000c157a9dd4560ddbc71565cb3bef3520a.tar.bz2
* elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
relocation header setup. * binutils-all/readelf.ss-tmips: Adjust symbol indices.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfxx-mips.c29
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/testsuite/binutils-all/readelf.ss-tmips12
4 files changed, 20 insertions, 30 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 47c0b40..4891435 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
+ relocation header setup.
+
2003-06-25 Alan Modra <amodra@bigpond.net.au>
* elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 3e85fc3..96f80ec 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -4639,30 +4639,11 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
hdr->sh_entsize = 8;
}
- /* The generic elf_fake_sections will set up REL_HDR using the
- default kind of relocations. But, we may actually need both
- kinds of relocations, so we set up the second header here.
-
- This is not necessary for the O32 ABI since that only uses Elf32_Rel
- relocations (cf. System V ABI, MIPS RISC Processor Supplement,
- 3rd Edition, p. 4-17). It breaks the IRIX 5/6 32-bit ld, since one
- of the resulting empty .rela.<section> sections starts with
- sh_offset == object size, and ld doesn't allow that. While the check
- is arguably bogus for empty or SHT_NOBITS sections, it can easily be
- avoided by not emitting those useless sections in the first place. */
- if (! SGI_COMPAT (abfd) && ! NEWABI_P(abfd)
- && (sec->flags & SEC_RELOC) != 0)
- {
- struct bfd_elf_section_data *esd;
- bfd_size_type amt = sizeof (Elf_Internal_Shdr);
-
- esd = elf_section_data (sec);
- BFD_ASSERT (esd->rel_hdr2 == NULL);
- esd->rel_hdr2 = (Elf_Internal_Shdr *) bfd_zalloc (abfd, amt);
- if (!esd->rel_hdr2)
- return FALSE;
- _bfd_elf_init_reloc_shdr (abfd, esd->rel_hdr2, sec, !sec->use_rela_p);
- }
+ /* The generic elf_fake_sections will set up REL_HDR using the default
+ kind of relocations. We used to set up a second header for the
+ non-default kind of relocations here, but only NewABI would use
+ these, and the IRIX ld doesn't like resulting empty RELA sections.
+ Thus we create those header only on demand now. */
return TRUE;
}
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 5b01202..ae11596 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * binutils-all/readelf.ss-tmips: Adjust symbol indices.
+
2003-06-26 Roland McGrath <roland@redhat.com>
* readelf.c (loadaddr): Variable removed.
diff --git a/binutils/testsuite/binutils-all/readelf.ss-tmips b/binutils/testsuite/binutils-all/readelf.ss-tmips
index da2a75b..4f2fba2 100644
--- a/binutils/testsuite/binutils-all/readelf.ss-tmips
+++ b/binutils/testsuite/binutils-all/readelf.ss-tmips
@@ -3,13 +3,13 @@ Symbol table '.symtab' contains 12 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 0 SECTION LOCAL DEFAULT 1
- 2: 00000000 0 SECTION LOCAL DEFAULT 4
- 3: 00000000 0 SECTION LOCAL DEFAULT 5
+ 2: 00000000 0 SECTION LOCAL DEFAULT 3
+ 3: 00000000 0 SECTION LOCAL DEFAULT 4
4: 00000000 0 NOTYPE LOCAL DEFAULT 1 static_text_symbol
- 5: 00000000 0 NOTYPE LOCAL DEFAULT 4 static_data_symbol
- 6: 00000000 0 SECTION LOCAL DEFAULT 6
- 7: 00000000 0 SECTION LOCAL DEFAULT 7
+ 5: 00000000 0 NOTYPE LOCAL DEFAULT 3 static_data_symbol
+ 6: 00000000 0 SECTION LOCAL DEFAULT 5
+ 7: 00000000 0 SECTION LOCAL DEFAULT 6
8: 00000000 0 OBJECT GLOBAL DEFAULT 1 text_symbol
9: 00000000 0 NOTYPE GLOBAL DEFAULT UND external_symbol
- 10: 00000000 0 OBJECT GLOBAL DEFAULT 4 data_symbol
+ 10: 00000000 0 OBJECT GLOBAL DEFAULT 3 data_symbol
11: 00000004 4 OBJECT GLOBAL DEFAULT (PRC|COM) common_symbol