mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 19:49:36 +00:00
Simplify handling of size relocations.
This is possible now that getSize is not a template. llvm-svn: 321900
This commit is contained in:
parent
01ccebf031
commit
8d13b213d4
@ -625,7 +625,7 @@ static uint64_t getRelocTargetVA(RelType Type, int64_t A, uint64_t P,
|
||||
case R_NEG_TLS:
|
||||
return Out::TlsPhdr->p_memsz - Sym.getVA(A);
|
||||
case R_SIZE:
|
||||
return A; // Sym.getSize was already folded into the addend.
|
||||
return Sym.getSize() + A;
|
||||
case R_TLSDESC:
|
||||
return InX::Got->getGlobalDynAddr(Sym) + A;
|
||||
case R_TLSDESC_PAGE:
|
||||
|
@ -997,10 +997,6 @@ static void scanRelocs(InputSectionBase &Sec, ArrayRef<RelTy> Rels) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// The size is not going to change, so we fold it in here.
|
||||
if (Expr == R_SIZE)
|
||||
Addend += Sym.getSize();
|
||||
|
||||
// If the produced value is a constant, we just remember to write it
|
||||
// when outputting this section. We also have to do it if the format
|
||||
// uses Elf_Rel, since in that case the written value is the addend.
|
||||
|
Loading…
Reference in New Issue
Block a user