From: Christian Eggers Date: Sun, 1 Nov 2020 08:10:14 +0000 (+0100) Subject: gas: fix symbol value calculation for versioned symbol aliases X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=05862db73fb5cad8bdae85e240b7b4713aad327e;p=binutils-gdb.git 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 --- diff --git a/gas/ChangeLog b/gas/ChangeLog index b965dbb90ea..3c2d6891dc4 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2020-11-03 Christian Eggers + + * config/obj-elf (elf_frob_symbol): Fix symbol value calculation + for versioned symbol aliases. + 2020-10-30 H.J. Lu PR gas/26703 diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index f061ea61f3e..93eb81e98a4 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));