From 66e17d7f5306149e4ac421015d305d00eb1a2f0f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 29 Jun 2012 07:37:50 +0000 Subject: * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela section for bss type sections, except for .rela.bss. * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise. * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise. * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise. --- bfd/elf32-sh.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'bfd/elf32-sh.c') diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index c7a8b2b..c33995a 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -2749,32 +2749,6 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) && !create_got_section (abfd, info)) return FALSE; - { - const char *secname; - char *relname; - flagword secflags; - asection *sec; - - for (sec = abfd->sections; sec; sec = sec->next) - { - secflags = bfd_get_section_flags (abfd, sec); - if ((secflags & (SEC_DATA | SEC_LINKER_CREATED)) - || ((secflags & SEC_HAS_CONTENTS) != SEC_HAS_CONTENTS)) - continue; - secname = bfd_get_section_name (abfd, sec); - relname = (char *) bfd_malloc ((bfd_size_type) strlen (secname) + 6); - strcpy (relname, ".rela"); - strcat (relname, secname); - if (bfd_get_section_by_name (abfd, secname)) - continue; - s = bfd_make_section_with_flags (abfd, relname, - flags | SEC_READONLY); - if (s == NULL - || ! bfd_set_section_alignment (abfd, s, ptralign)) - return FALSE; - } - } - if (bed->want_dynbss) { /* The .dynbss section is a place to put symbols which are defined -- cgit v1.1