[Xtensa] always emit DT_PLTGOT

Bob Wilson bwilson@tensilica.com
Tue Dec 4 22:50:00 GMT 2007


The DT_PLTGOT dynamic entry for Xtensa was produced by the linker only when 
there was a PLT.  This caused a problem for uClibc with an empty program that 
had no PLT, because we were relying on uClibc's INIT_GOT hook to do some 
initialization.  This patch changes BFD to always emit DT_PLTGOT for Xtensa 
dynamic objects.  Aside from the uClibc issue, this makes sense since DT_PLTGOT 
for Xtensa identifies the .got section, which is always present even if there is 
no PLT.  Tested by building a uClibc toolchain and compiling an empty program. 
I've committed this.

2007-12-04  Bob Wilson  <bob.wilson@acm.org>

	* elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Create DT_PLTGOT
	entry for all dynamic objects.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bfd-pltgot.patch
Type: text/x-diff
Size: 949 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20071204/7c3e69c0/attachment.bin>


More information about the Binutils mailing list