aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCELF.cpp
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2013-10-29 01:06:17 +0000
committerJoerg Sonnenberger <joerg@bec.de>2013-10-29 01:06:17 +0000
commit72580780a98cb8b0019b7ec4ed88e3f3328b9969 (patch)
tree6d102a4a9edc24e52c439ea4420dbd1606770fe3 /lib/MC/MCELF.cpp
parent8ef9cebb68d6305e197c3e0b8369aa3c57570bbf (diff)
downloadexternal_llvm-72580780a98cb8b0019b7ec4ed88e3f3328b9969.tar.gz
external_llvm-72580780a98cb8b0019b7ec4ed88e3f3328b9969.tar.bz2
external_llvm-72580780a98cb8b0019b7ec4ed88e3f3328b9969.zip
Move the STT_FILE symbols out of the normal symbol table processing for
ELF. They can overlap with the other symbols, e.g. if a source file "foo.c" contains a function "foo" with a static variable "c". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCELF.cpp')
-rw-r--r--lib/MC/MCELF.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/MC/MCELF.cpp b/lib/MC/MCELF.cpp
index 560cdbc6ab..ebb189e543 100644
--- a/lib/MC/MCELF.cpp
+++ b/lib/MC/MCELF.cpp
@@ -36,8 +36,8 @@ unsigned MCELF::GetBinding(const MCSymbolData &SD) {
void MCELF::SetType(MCSymbolData &SD, unsigned Type) {
assert(Type == ELF::STT_NOTYPE || Type == ELF::STT_OBJECT ||
Type == ELF::STT_FUNC || Type == ELF::STT_SECTION ||
- Type == ELF::STT_FILE || Type == ELF::STT_COMMON ||
- Type == ELF::STT_TLS || Type == ELF::STT_GNU_IFUNC);
+ Type == ELF::STT_COMMON || Type == ELF::STT_TLS ||
+ Type == ELF::STT_GNU_IFUNC);
uint32_t OtherFlags = SD.getFlags() & ~(0xf << ELF_STT_Shift);
SD.setFlags(OtherFlags | (Type << ELF_STT_Shift));
@@ -47,8 +47,7 @@ unsigned MCELF::GetType(const MCSymbolData &SD) {
uint32_t Type = (SD.getFlags() & (0xf << ELF_STT_Shift)) >> ELF_STT_Shift;
assert(Type == ELF::STT_NOTYPE || Type == ELF::STT_OBJECT ||
Type == ELF::STT_FUNC || Type == ELF::STT_SECTION ||
- Type == ELF::STT_FILE || Type == ELF::STT_COMMON ||
- Type == ELF::STT_TLS || Type == ELF::STT_GNU_IFUNC);
+ Type == ELF::STT_COMMON || Type == ELF::STT_TLS || Type == ELF::STT_GNU_IFUNC);
return Type;
}