public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Microblaze linker segmentation fault
@ 2019-05-28  8:29 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2019-05-28  8:29 UTC (permalink / raw)
  To: binutils

	PR 24596
	* elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
	attempt to set sh_entsize for excluded PLT section.

diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index 8015465109..8d1700bf0f 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -3455,9 +3455,10 @@ microblaze_elf_finish_dynamic_sections (bfd *output_bfd,
 	  memset (splt->contents, 0, PLT_ENTRY_SIZE);
 	  bfd_put_32 (output_bfd, (bfd_vma) 0x80000000 /* nop.  */,
 		      splt->contents + splt->size - 4);
-	}
 
-      elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
+	  if (splt->output_section != bfd_abs_section_ptr)
+	    elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
+	}
     }
 
   /* Set the first entry in the global offset table to the address of

-- 
Alan Modra
Australia Development Lab, IBM

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

only message in thread, other threads:[~2019-05-28  8:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-28  8:29 Microblaze linker segmentation fault Alan Modra

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).