[PATCH] D63121: [ELF] Make the rule to create relative relocations in a writable section stricter
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 11 03:26:20 PDT 2019
MaskRay marked an inline comment as done.
MaskRay added inline comments.
================
Comment at: ELF/Target.h:98
RelType IRelativeRel;
+ RelType SymbolicRel;
RelType TlsDescRel;
----------------
arichardson wrote:
> Maybe something like 'AbsPtrRel'? To me symbolic does not necessarily imply a elf_addr size relocation against a symbol.
I'd like to stick with the current name. AbsPtrRel sounds to me it has something to do with pointers but it doesn't. I have to confess this name was inspired by musl defined general dynamic relocation types:
http://git.musl-libc.org/cgit/musl/tree/arch/x86_64/reloc.h#n7
#define REL_SYMBOLIC R_X86_64_64
Symbolic means it takes the address of a symbol at runtime.
```
case REL_SYMBOLIC:
case REL_GOT:
case REL_PLT:
*reloc_addr = sym_val + addend;
break;
case REL_RELATIVE:
*reloc_addr = (size_t)base + addend;
break;
```
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63121/new/
https://reviews.llvm.org/D63121
More information about the llvm-commits
mailing list