[llvm-commits] Patch to add way to access a symbol's st_value
Sid Manning
sidneym at codeaurora.org
Mon Jul 9 16:44:46 PDT 2012
Hi,
I wanted to add an interface to allow direct access to a symbol's
st_value. I did notice that getSymbolAddress/getSymbolFileOffset can
also return st_value in some cases.
When type symbol is common or undefined the returned Result from
getSymbolAddress for example is UnknownAddressOrSize, however the ELF
spec says that, "In relocatable files, st_value holds alignment
constraints for a symbol whose section index is SHN_COMMON." So I guess
in this case the API name getSymbolAddress wouldn't make sense if it did
return alignment.
The reason for adding this is that it addresses a comment in the
ReaderELF.cpp patch regarding what an Atom's rawContent (Defined Atom's
Data paramenter) should be.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ELF.h-add-getValue.diff
Type: text/x-patch
Size: 1055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120709/fa9b775c/attachment.bin>
More information about the llvm-commits
mailing list