fix uninitialized values in Xtensa PIC code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

fix uninitialized values in Xtensa PIC code

Bob Wilson
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  <[hidden email]>

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



gas-plt-rel.diff (1K) Download Attachment