[patch, nios2] don't set sh_entsize for PLT section

Sandra Loosemore sandra@codesourcery.com
Sat Jun 22 20:08:00 GMT 2013


The nios2 BFD port is presently setting the sh_entsize ELF attribute for 
the PLT section to the size of the first PLT entry.  However, this is 
incorrect; the nios2 ABI allows PLT entries of different sizes, and the 
ELF specification says that sh_entsize should be nonzero only if all 
entries are that size.  Since BFD normally defaults this to zero, all 
that's needed is to delete the code that is erroneously setting sh_entsize.

This bug was found by a customer who was doing elfutils/libelf testing, 
but readelf on a simple "hello, world" program was sufficient to show 
the problem and verify the fix.

Patch committed after usual regression testing on nios2-linux-gnu target.

-Sandra

-------------- next part --------------
A non-text attachment was scrubbed...
Name: plt-es.log
Type: text/x-log
Size: 158 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20130622/1bbc9d11/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plt-es.patch
Type: text/x-patch
Size: 970 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20130622/1bbc9d11/attachment-0001.bin>


More information about the Binutils mailing list