From 0414f35b827c242a1541214a9f59ddb41ecd59f8 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 15 May 2007 08:39:58 +0000 Subject: PR 4479 * elf.c (elf_fake_sections): Don't allow backend to change SHT_NOBITS if called for strip/objcopy --only-keep-debug. * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove similar fix from here. --- bfd/elfxx-mips.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'bfd/elfxx-mips.c') diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index d01b3e980cf..23ea876b107 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -5593,11 +5593,7 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd, bfd_boolean _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) { - register const char *name; - unsigned int sh_type; - - name = bfd_get_section_name (abfd, sec); - sh_type = hdr->sh_type; + const char *name = bfd_get_section_name (abfd, sec); if (strcmp (name, ".liblist") == 0) { @@ -5698,12 +5694,6 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) hdr->sh_entsize = 8; } - /* In the unlikely event a special section is empty it has to lose its - special meaning. This may happen e.g. when using `strip' with the - "--only-keep-debug" option. */ - if (sec->size > 0 && !(sec->flags & SEC_HAS_CONTENTS)) - hdr->sh_type = sh_type; - /* 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 -- cgit v1.2.1