aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ELF.h
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-06-25 07:36:24 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-06-25 07:36:24 +0000
commita5e0abd0d454ffdb22f8647f4319b178901b08be (patch)
tree5a6eb50876c8ca647efe9e5141c7b237262adb76 /lib/CodeGen/ELF.h
parentc9028e69f11246a051c3de1457cd89d46e82ca60 (diff)
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
Diffstat (limited to 'lib/CodeGen/ELF.h')
-rw-r--r--lib/CodeGen/ELF.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/CodeGen/ELF.h b/lib/CodeGen/ELF.h
index 28b6be8910..8d92373b71 100644
--- a/lib/CodeGen/ELF.h
+++ b/lib/CodeGen/ELF.h
@@ -144,6 +144,9 @@ namespace llvm {
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 @@ namespace llvm {
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 @@ namespace llvm {
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);