[PATCH] D15965: Add support for dumping relocations in non-relocatable files
Shankar Easwaran via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 24 12:35:17 PDT 2016
shankare added a reviewer: shankare.
shankare added a comment.
This member gives the location at which to apply the relocation action. For a relocatable file, the value is the byte offset from the beginning of the section to the storage unit affected by the relocation. For an executable file or a shared object, the value is the virtual address of the storage unit affected by the relocation.
This shows that the assertion is incorrect, as the ELF ABI suggests reading relocation records is valid in Executables as well.
While relocation offset is not looked up for shared libraries from .rela.dyn and .rela.plt sections, there is a usecase where relocation sections are generated with the linker switch **--emit-relocs**
Removing the assertion, LGTM.
More information about the llvm-commits