mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Mark the first dynamic elf symbol as SF_FormatSpecific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200578 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f96f832a3c
commit
b81f60fd76
@ -379,7 +379,8 @@ error_code ELFObjectFile<ELFT>::getSymbolType(DataRefImpl Symb,
|
||||
|
||||
template <class ELFT>
|
||||
uint32_t ELFObjectFile<ELFT>::getSymbolFlags(DataRefImpl Symb) const {
|
||||
const Elf_Sym *ESym = getSymbol(Symb);
|
||||
Elf_Sym_Iter EIter = toELFSymIter(Symb);
|
||||
const Elf_Sym *ESym = &*EIter;
|
||||
|
||||
uint32_t Result = SymbolRef::SF_None;
|
||||
|
||||
@ -393,7 +394,7 @@ uint32_t ELFObjectFile<ELFT>::getSymbolFlags(DataRefImpl Symb) const {
|
||||
Result |= SymbolRef::SF_Absolute;
|
||||
|
||||
if (ESym->getType() == ELF::STT_FILE || ESym->getType() == ELF::STT_SECTION ||
|
||||
ESym == &*EF.begin_symbols())
|
||||
EIter == EF.begin_symbols() || EIter == EF.begin_dynamic_symbols())
|
||||
Result |= SymbolRef::SF_FormatSpecific;
|
||||
|
||||
if (EF.getSymbolTableIndex(ESym) == ELF::SHN_UNDEF)
|
||||
|
@ -1,6 +1,7 @@
|
||||
RUN: llvm-nm -D %p/Inputs/shared-object-test.elf-i386 \
|
||||
RUN: | FileCheck %s -check-prefix ELF-32
|
||||
|
||||
ELF-32-NOT: U
|
||||
ELF-32: 0012c8 A __bss_start
|
||||
ELF-32: 0012c8 A _edata
|
||||
ELF-32: 0012cc A _end
|
||||
@ -12,6 +13,7 @@ ELF-32: 000000 D tls_sym
|
||||
RUN: llvm-nm -D %p/Inputs/shared-object-test.elf-x86-64 \
|
||||
RUN: | FileCheck %s -check-prefix ELF-64
|
||||
|
||||
ELF-64-NOT: U
|
||||
ELF-64: 200454 A __bss_start
|
||||
ELF-64: 200454 A _edata
|
||||
ELF-64: 200458 A _end
|
||||
|
Loading…
Reference in New Issue
Block a user