binutils-gdb
binutils-gdb copied to clipboard
ELIMINATE_COPY_RELOCS
Ports like x86-64 set ELIMINATE_COPY_RELOCS, which I think does the following:
- there's a non-GOT relocation to a data symbol defined in a shared library
- ordinarily, that would mean creating a copy reloc
- but all such relocations are in read-only sections, so we know the symbol data wouldn't be modified through the non-GOT relocations, so we skip the entire procedure and relocate to the copy of the symbol in the shared library instead.
Considering we don't even have read-only memory, I'm not going to implement this mere optimization for now. Unless I'm wrong and it isn't an optimization, but required for correctness somehow.