[PATCH] [ELF] Introduce getValue() for ELF Symbols
Davide Italiano
dccitaliano at gmail.com
Mon Jun 8 16:36:11 PDT 2015
Hi rafael,
COFF has a similar function, because linkers, or tool in general, need it. At least, my ELF backend rewrite does.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D10328
Files:
include/llvm/Object/ELFTypes.h
Index: include/llvm/Object/ELFTypes.h
===================================================================
--- include/llvm/Object/ELFTypes.h
+++ include/llvm/Object/ELFTypes.h
@@ -156,11 +156,13 @@
using Elf_Sym_Base<ELFT>::st_info;
using Elf_Sym_Base<ELFT>::st_shndx;
using Elf_Sym_Base<ELFT>::st_other;
+ using Elf_Sym_Base<ELFT>::st_value;
// These accessors and mutators correspond to the ELF32_ST_BIND,
// ELF32_ST_TYPE, and ELF32_ST_INFO macros defined in the ELF specification:
unsigned char getBinding() const { return st_info >> 4; }
unsigned char getType() const { return st_info & 0x0f; }
+ uint64_t getValue() const { return st_value; }
void setBinding(unsigned char b) { setBindingAndType(b, getType()); }
void setType(unsigned char t) { setBindingAndType(getBinding(), t); }
void setBindingAndType(unsigned char b, unsigned char t) {
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10328.27347.patch
Type: text/x-patch
Size: 882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150608/bb5ce523/attachment.bin>
More information about the llvm-commits
mailing list