diff options
Diffstat (limited to 'gold/copy-relocs.cc')
-rw-r--r-- | gold/copy-relocs.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/copy-relocs.cc b/gold/copy-relocs.cc index 80b50df..6ef72d3 100644 --- a/gold/copy-relocs.cc +++ b/gold/copy-relocs.cc @@ -84,7 +84,8 @@ Copy_relocs<sh_type, size, big_endian>::need_copy_reloc( Sized_relobj<size, big_endian>* object, unsigned int shndx) const { - // FIXME: Handle -z nocopyrelocs. + if (!parameters->options().copyreloc()) + return false; if (sym->symsize() == 0) return false; @@ -109,6 +110,9 @@ Copy_relocs<sh_type, size, big_endian>::emit_copy_reloc( Sized_symbol<size>* sym, Output_data_reloc<sh_type, true, size, big_endian>* reloc_section) { + // We should not be here if -z nocopyreloc is given. + gold_assert(parameters->options().copyreloc()); + typename elfcpp::Elf_types<size>::Elf_WXword symsize = sym->symsize(); // There is no defined way to determine the required alignment of |