Implement get getSymbolFileOffset with getSymbolAddress.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 3 Apr 2014 03:13:33 +0000 (03:13 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 3 Apr 2014 03:13:33 +0000 (03:13 +0000)
commit051c948bbe3f64a7c450120963b28a5959382cb8
tree255817868a1b2f2ab59f0901b2f0c859e690f02a
parent35395192231722cdf66b6914f27f465cc0358c68
Implement get getSymbolFileOffset with getSymbolAddress.

This has the following advantages:
* Less code.
* The old ELF implementation was wrong for non-relocatable objects.
* The old ELF implementation (and I think MachO) was wrong for thumb.

No current testcase since this is only used from MCJIT and it only uses
relocatable objects and I don't think it supports thumb yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205508 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/COFF.h
include/llvm/Object/ELFObjectFile.h
include/llvm/Object/MachO.h
include/llvm/Object/ObjectFile.h
lib/Object/COFFObjectFile.cpp
lib/Object/MachOObjectFile.cpp