[prev in list] [next in list] [prev in thread] [next in thread]
List: binutils
Subject: [PATCH, microblaze/ld] Reuse .rela.got section
From: Michael Eager <eager () eagerm ! com>
Date: 2012-01-27 16:48:46
Message-ID: 4F22D56E.5030903 () eagerm ! com
[Download RAW message or body]
The linker was failing if the .rela.got section already existed.
2012-01-27 Michael Eager <eager@eagercon.com>
* bfd/elf32-microblaze.c (create_got_section):
Reuse existing .rela.got section.
Index: bfd/elf32-microblaze.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-microblaze.c,v
retrieving revision 1.11
diff -u -p -r1.11 elf32-microblaze.c
--- bfd/elf32-microblaze.c 13 Jun 2011 00:59:10 -0000 1.11
+++ bfd/elf32-microblaze.c 27 Jan 2012 16:41:45 -0000
@@ -1880,7 +1880,8 @@ create_got_section (bfd *dynobj, struct
if (!htab->sgot || !htab->sgotplt)
return FALSE;
- htab->srelgot = bfd_make_section (dynobj, ".rela.got");
+ if (!(htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got")))
+ htab->srelgot = bfd_make_section (dynobj, ".rela.got");
if (htab->srelgot == NULL
|| ! bfd_set_section_flags (dynobj, htab->srelgot, SEC_ALLOC
| SEC_LOAD
Applied.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic