diff options
author | Christian Eggers <ceggers@gmx.de> | 2020-11-01 09:10:14 +0100 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-11-03 18:17:35 +1030 |
commit | 05862db73fb5cad8bdae85e240b7b4713aad327e (patch) | |
tree | f2580205f7c0391e50ddf6ca07ce761675d67a6f /gas | |
parent | 706d7ce94809f3d647450eb54e2e77e4732bd9af (diff) | |
download | fsf-binutils-gdb-05862db73fb5cad8bdae85e240b7b4713aad327e.zip fsf-binutils-gdb-05862db73fb5cad8bdae85e240b7b4713aad327e.tar.gz fsf-binutils-gdb-05862db73fb5cad8bdae85e240b7b4713aad327e.tar.bz2 |
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>
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/obj-elf.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index b965dbb..3c2d689 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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> PR gas/26703 diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index f061ea6..93eb81e 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -2588,7 +2588,8 @@ elf_frob_symbol (symbolS *symp, int *puntp) because we are in the middle of the final loop. */ S_SET_VALUE (symp2, (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)); |