aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-06-17 18:08:35 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-06-17 18:08:35 +0000
commit64e77c6d5fe85b9f3d20579b496f31c329b1e62b (patch)
treea0315f63d78e86772a2102497a1c47e2872b35b2 /bfd/elf32-sh.c
parent6bfb4e30b89061e341dad3625360564ab75b1582 (diff)
downloadgdb-64e77c6d5fe85b9f3d20579b496f31c329b1e62b.zip
gdb-64e77c6d5fe85b9f3d20579b496f31c329b1e62b.tar.gz
gdb-64e77c6d5fe85b9f3d20579b496f31c329b1e62b.tar.bz2
2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
* elf32-arm.c (create_got_section): Get existing .rela.got section. * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise. * elf32-lm32.c (create_got_section): Likewise. * elf32-m32r.c (create_got_section): Likewise. * elf32-ppc.c (ppc_elf_create_got): Likewise. * elf32-s390.c (create_got_section): Likewise. * elf32-sh.c (create_got_section): Likewise. * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise. * elf64-s390.c (create_got_section): Likewise. * elfxx-sparc.c (create_got_section): Likewise. * elflink.c (_bfd_elf_create_got_section): Properly initialize the GOT size.
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r--bfd/elf32-sh.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 89cef67..555d900 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -2303,18 +2303,9 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info)
htab = sh_elf_hash_table (info);
htab->sgot = bfd_get_section_by_name (dynobj, ".got");
htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
- if (! htab->sgot || ! htab->sgotplt)
+ htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ if (! htab->sgot || ! htab->sgotplt || ! htab->srelgot)
abort ();
-
- htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got",
- (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY));
- if (htab->srelgot == NULL
- || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
- return FALSE;
return TRUE;
}