aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-04-03 00:19:35 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-04-03 00:19:35 +0000
commitb4865d698be45ae548284720da4a60fd9f0e3f44 (patch)
treeb273d6e5939288bd4cf28f7644c3f8dfea6c2f35 /llvm/lib/Object/COFFObjectFile.cpp
parent7c6fcd2060ce76d77be683cef491604426c700b4 (diff)
downloadllvm-b4865d698be45ae548284720da4a60fd9f0e3f44.zip
llvm-b4865d698be45ae548284720da4a60fd9f0e3f44.tar.gz
llvm-b4865d698be45ae548284720da4a60fd9f0e3f44.tar.bz2
Revert "Fix a nomenclature error in llvm-nm."
This reverts commit r205479. It turns out that nm does use addresses, it is just that every reasonable relocatable ELF object has sections with address 0. I have no idea if those exist in reality, but it at least it shows that llvm-nm should use the name address. The added test was includes an unusual .o file with non 0 section addresses. I created it by hacking ELFObjectWriter.cpp. Really sorry for the churn. llvm-svn: 205493
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 2784f5c..43913e4 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -253,15 +253,8 @@ error_code COFFObjectFile::getSymbolSection(DataRefImpl Ref,
}
error_code COFFObjectFile::getSymbolValue(DataRefImpl Ref,
- uint64_t &Result) const {
- const coff_symbol *Symb = toSymb(Ref);
-
- if (Symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED)
- Result = UnknownAddressOrSize;
- else
- Result = Symb->Value;
-
- return object_error::success;
+ uint64_t &Val) const {
+ report_fatal_error("getSymbolValue unimplemented in COFFObjectFile");
}
void COFFObjectFile::moveSectionNext(DataRefImpl &Ref) const {