[llvm] r186860 - Mark ELF's first symbol as format specific so that llvm-nm ignores it.
Rafael Espindola
rafael.espindola at gmail.com
Mon Jul 22 12:24:35 PDT 2013
Author: rafael
Date: Mon Jul 22 14:24:34 2013
New Revision: 186860
URL: http://llvm.org/viewvc/llvm-project?rev=186860&view=rev
Log:
Mark ELF's first symbol as format specific so that llvm-nm ignores it.
Modified:
llvm/trunk/include/llvm/Object/ELF.h
llvm/trunk/test/Object/nm-trivial-object.test
Modified: llvm/trunk/include/llvm/Object/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELF.h?rev=186860&r1=186859&r2=186860&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELF.h (original)
+++ llvm/trunk/include/llvm/Object/ELF.h Mon Jul 22 14:24:34 2013
@@ -1232,7 +1232,8 @@ error_code ELFObjectFile<ELFT>::getSymbo
Result |= SymbolRef::SF_Absolute;
if (symb->getType() == ELF::STT_FILE ||
- symb->getType() == ELF::STT_SECTION)
+ symb->getType() == ELF::STT_SECTION ||
+ Symb == begin_symbols()->getRawDataRefImpl())
Result |= SymbolRef::SF_FormatSpecific;
if (getSymbolTableIndex(symb) == ELF::SHN_UNDEF)
Modified: llvm/trunk/test/Object/nm-trivial-object.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/nm-trivial-object.test?rev=186860&r1=186859&r2=186860&view=diff
==============================================================================
--- llvm/trunk/test/Object/nm-trivial-object.test (original)
+++ llvm/trunk/test/Object/nm-trivial-object.test Mon Jul 22 14:24:34 2013
@@ -18,6 +18,7 @@ COFF: U {{_?}}SomeOtherFunction
COFF: 00000000 T {{_?}}main
COFF: U {{_?}}puts
+ELF-NOT: U
ELF: U SomeOtherFunction
ELF: 00000000 T main
ELF: U puts
More information about the llvm-commits
mailing list