public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, microblaze/ld] Reuse .rela.got section
@ 2012-01-27 16:49 Michael Eager
  0 siblings, 0 replies; only message in thread
From: Michael Eager @ 2012-01-27 16:49 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-27 16:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-27 16:49 [PATCH, microblaze/ld] Reuse .rela.got section Michael Eager

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).