Object: Provide a richer means of describing auxiliary symbols

The current state of affairs has auxiliary symbols described as a big
bag of bytes. This is less than satisfying, it detracts from the YAML
file as being human readable.

Instead, allow for symbols to optionally contain their auxiliary data.
This allows us to have a much higher level way of describing things like
weak symbols, function definitions and section definitions.

This depends on D3105.

Differential Revision: http://llvm-reviews.chandlerc.com/D3092

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Majnemer
2014-03-19 04:47:47 +00:00
parent 92c5a193e0
commit 6d191534f6
14 changed files with 457 additions and 54 deletions

View File

@ -212,6 +212,10 @@ namespace COFF {
SCT_COMPLEX_TYPE_SHIFT = 4
};
enum AuxSymbolType {
IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF = 1
};
struct section {
char Name[NameSize];
uint32_t VirtualSize;
@ -337,7 +341,7 @@ namespace COFF {
uint32_t TotalSize;
uint32_t PointerToLinenumber;
uint32_t PointerToNextFunction;
uint8_t unused[2];
char unused[2];
};
struct AuxiliarybfAndefSymbol {
@ -372,7 +376,14 @@ namespace COFF {
uint32_t CheckSum;
uint16_t Number;
uint8_t Selection;
uint8_t unused[3];
char unused[3];
};
struct AuxiliaryCLRToken {
uint8_t AuxType;
uint8_t unused1;
uint32_t SymbolTableIndex;
char unused2[12];
};
union Auxiliary {