diff options
Diffstat (limited to 'gold/copy-relocs.cc')
-rw-r--r-- | gold/copy-relocs.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gold/copy-relocs.cc b/gold/copy-relocs.cc index 1e9705e..3df50c8 100644 --- a/gold/copy-relocs.cc +++ b/gold/copy-relocs.cc @@ -118,8 +118,11 @@ Copy_relocs<sh_type, size, big_endian>::emit_copy_reloc( // that. Then we reduce that alignment if the symbol is not aligned // within the section. gold_assert(sym->is_from_dynobj()); + bool is_ordinary; + unsigned int shndx = sym->shndx(&is_ordinary); + gold_assert(is_ordinary); typename elfcpp::Elf_types<size>::Elf_WXword addralign = - sym->object()->section_addralign(sym->shndx()); + sym->object()->section_addralign(shndx); typename Sized_symbol<size>::Value_type value = sym->value(); while ((value & (addralign - 1)) != 0) |