fix uninitialized values in Xtensa PIC code

Bob Wilson bwilson@tensilica.com
Thu Jan 26 05:32:00 GMT 2006


I recently discovered that the md_apply_fix function in the Xtensa  
port of GAS has been failing to "apply" any value at all for  
XTENSA_PLT relocations, leading to uninitialized data in the output.   
This shows up clearly with valgrind but is apparently harmless  in  
many cases, perhaps because the data is usually zero.  It did cause  
one real failure for a program in the GCC testsuite.  The patch  
changes the function to always set the value to something, with a   
default of zero.  Tested and committed on the mainline.

2006-01-25  Bob Wilson  <bob.wilson@acm.org>

         * config/tc-xtensa.c (md_apply_fix): Set value to zero for  
PLT relocs.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: gas-plt-rel.diff
Type: application/octet-stream
Size: 1343 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20060126/0b618255/attachment.obj>


More information about the Binutils mailing list