Support Constant Pool Sections
Add section symbols to the symbol table
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74170 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/ELF.h b/lib/CodeGen/ELF.h
index 28b6be8..8d92373 100644
--- a/lib/CodeGen/ELF.h
+++ b/lib/CodeGen/ELF.h
@@ -144,6 +144,9 @@
uint8_t Other;
unsigned short SectionIdx;
+ // Symbol index into the Symbol table
+ unsigned SymTabIdx;
+
enum {
STB_LOCAL = 0,
STB_GLOBAL = 1,
@@ -168,7 +171,8 @@
ELFSym(const GlobalValue *gv) : GV(gv), IsCommon(false), IsBss(false),
IsConstant(false), NameIdx(0), Value(0),
Size(0), Info(0), Other(STV_DEFAULT),
- SectionIdx(ELFSection::SHN_UNDEF) {
+ SectionIdx(ELFSection::SHN_UNDEF),
+ SymTabIdx(0) {
if (!GV)
return;
@@ -191,6 +195,10 @@
return (Info >> 4) & 0xf;
}
+ unsigned getType() {
+ return Info & 0xf;
+ }
+
void setBind(unsigned X) {
assert(X == (X & 0xF) && "Bind value out of range!");
Info = (Info & 0x0F) | (X << 4);