diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-24 10:20:30 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-24 10:20:30 +0000 |
| commit | d7a32ea4b86c04ba0c4736f803527eb393a40867 (patch) | |
| tree | 1b09dcd2e51416a33c0b030346842e8ea6dd3e38 /llvm/lib/Target | |
| parent | 595348228569c587e14bf8cea1c4fdf1b503c104 (diff) | |
| download | bcm5719-llvm-d7a32ea4b86c04ba0c4736f803527eb393a40867.tar.gz bcm5719-llvm-d7a32ea4b86c04ba0c4736f803527eb393a40867.zip | |
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.
llvm-svn: 240529
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp index 7c09e5d5958..a84c4c58494 100644 --- a/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp +++ b/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp @@ -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); |

