mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
gas: fix symbol value calculation for versioned symbol aliases
Symbol value is in bytes while fragS::fr_address is in octets. Fixes GAS symver12 and symver13 tests on ELF targets with with OCTETS_PER_BYTE>1. * config/obj-elf (elf_frob_symbol): Fix symbol value calculation for versioned symbol aliases. Signed-off-by: Christian Eggers <ceggers@gmx.de>
This commit is contained in:

committed by
Alan Modra

parent
706d7ce948
commit
05862db73f
@ -1,3 +1,8 @@
|
|||||||
|
2020-11-03 Christian Eggers <ceggers@gmx.de>
|
||||||
|
|
||||||
|
* config/obj-elf (elf_frob_symbol): Fix symbol value calculation
|
||||||
|
for versioned symbol aliases.
|
||||||
|
|
||||||
2020-10-30 H.J. Lu <hongjiu.lu@intel.com>
|
2020-10-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR gas/26703
|
PR gas/26703
|
||||||
|
@ -2588,7 +2588,8 @@ elf_frob_symbol (symbolS *symp, int *puntp)
|
|||||||
because we are in the middle of the final loop. */
|
because we are in the middle of the final loop. */
|
||||||
S_SET_VALUE (symp2,
|
S_SET_VALUE (symp2,
|
||||||
(S_GET_VALUE (symp)
|
(S_GET_VALUE (symp)
|
||||||
- symbol_get_frag (symp)->fr_address));
|
- (symbol_get_frag (symp)->fr_address
|
||||||
|
/ OCTETS_PER_BYTE)));
|
||||||
|
|
||||||
symbol_set_frag (symp2, symbol_get_frag (symp));
|
symbol_set_frag (symp2, symbol_get_frag (symp));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user