[Xtensa] fix difference of symbols in GAS

Bob Wilson bwilson@tensilica.com
Fri Nov 2 00:54:00 GMT 2007


I've committed this patch from Sterling Augustine.  When a difference  
of two symbols is used in a context where an expression symbol is  
generated, this patch marks the intervening frags so that they won't  
be transformed by link-time relaxation.  Without the patch, the  
difference value emitted by GAS would likely be incorrect after  
linker relaxation.  The disadvantage of this change is that it  
constrains the linker relaxation; currently it mostly affects C++  
code with exception handling.

2007-11-01  Sterling Augustine  <sterling@tensilica.com>

         * config/tc-xtensa.c (xtensa_symbol_new_hook): New.
         (xtensa_mark_difference_of_two_symbols): New.
         (xtensa_post_relax_hook): Call  
xtensa_mark_difference_of_two_symbols.
         * config/tc-xtensa.h (xtensa_symfield_type): Add  
next_expr_symbol.
         (tc_symbol_new_hook): Define.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gas-symdiff.patch
Type: application/octet-stream
Size: 3852 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20071102/c6b19916/attachment.obj>


More information about the Binutils mailing list