mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Change how symbol sizes are handled in lib/Object.
COFF and MachO only define symbol sizes for common symbols. Reflect that in the class hierarchy by having a method for common symbols only in the base and a general one in ELF. This avoids the need of using a magic value for the size, which had a few problems * Most callers didn't check for it. * The ones that did could not tell the magic value from a file actually having that value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240529 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -31,8 +31,8 @@ public:
|
||||
|
||||
StringRef SymName; SymI->getName(SymName);
|
||||
uint64_t SymAddr; SymI->getAddress(SymAddr);
|
||||
uint64_t SymSize = SymI->getSize();
|
||||
auto *Obj = cast<ELFObjectFileBase>(Rel.getObjectFile());
|
||||
uint64_t SymSize = Obj->getSymbolSize(*SymI);
|
||||
int64_t Addend = *Obj->getRelocationAddend(Rel.getRawDataRefImpl());
|
||||
|
||||
MCSymbol *Sym = Ctx.getOrCreateSymbol(SymName);
|
||||
|
Reference in New Issue
Block a user