mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-14 02:33:53 +00:00
Object: Move auxiliary symbol definitions from llvm-readobj
Summary: These definitions are useful to other aspects of LLVM, move them out. Reviewers: rafael, nrieck, ruiu CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3105 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204213 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
75141e6c47
commit
92c5a193e0
@ -223,6 +223,22 @@ struct coff_relocation {
|
||||
support::ulittle16_t Type;
|
||||
};
|
||||
|
||||
struct coff_aux_function_definition {
|
||||
support::ulittle32_t TagIndex;
|
||||
support::ulittle32_t TotalSize;
|
||||
support::ulittle32_t PointerToLinenumber;
|
||||
support::ulittle32_t PointerToNextFunction;
|
||||
char Unused[2];
|
||||
};
|
||||
|
||||
struct coff_aux_bf_and_ef_symbol {
|
||||
char Unused1[4];
|
||||
support::ulittle16_t Linenumber;
|
||||
char Unused2[6];
|
||||
support::ulittle32_t PointerToNextFunction;
|
||||
char Unused3[2];
|
||||
};
|
||||
|
||||
struct coff_aux_weak_external {
|
||||
support::ulittle32_t TagIndex;
|
||||
support::ulittle32_t Characteristics;
|
||||
@ -239,6 +255,13 @@ struct coff_aux_section_definition {
|
||||
char Unused[3];
|
||||
};
|
||||
|
||||
struct coff_aux_clr_token {
|
||||
support::ulittle8_t AuxType;
|
||||
support::ulittle8_t Reserved;
|
||||
support::ulittle32_t SymbolTableIndex;
|
||||
char Unused[12];
|
||||
};
|
||||
|
||||
struct coff_load_configuration32 {
|
||||
support::ulittle32_t Characteristics;
|
||||
support::ulittle32_t TimeDateStamp;
|
||||
|
@ -430,30 +430,9 @@ static const EnumEntry<unsigned> UnwindOpInfo[] = {
|
||||
|
||||
// Some additional COFF structures not defined by llvm::object.
|
||||
namespace {
|
||||
struct coff_aux_function_definition {
|
||||
support::ulittle32_t TagIndex;
|
||||
support::ulittle32_t TotalSize;
|
||||
support::ulittle32_t PointerToLineNumber;
|
||||
support::ulittle32_t PointerToNextFunction;
|
||||
uint8_t Unused[2];
|
||||
};
|
||||
|
||||
struct coff_aux_weak_external_definition {
|
||||
support::ulittle32_t TagIndex;
|
||||
support::ulittle32_t Characteristics;
|
||||
uint8_t Unused[10];
|
||||
};
|
||||
|
||||
struct coff_aux_file_record {
|
||||
char FileName[18];
|
||||
};
|
||||
|
||||
struct coff_aux_clr_token {
|
||||
support::ulittle8_t AuxType;
|
||||
support::ulittle8_t Reserved;
|
||||
support::ulittle32_t SymbolTableIndex;
|
||||
uint8_t Unused[12];
|
||||
};
|
||||
} // namespace
|
||||
|
||||
static uint64_t getOffsetOfLSDA(const Win64EH::UnwindInfo& UI) {
|
||||
@ -970,7 +949,9 @@ void COFFDumper::printSymbol(const SymbolRef &Sym) {
|
||||
if (Symbol->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL &&
|
||||
Symbol->getBaseType() == COFF::IMAGE_SYM_TYPE_NULL &&
|
||||
Symbol->getComplexType() == COFF::IMAGE_SYM_DTYPE_FUNCTION &&
|
||||
Symbol->SectionNumber > 0) {
|
||||
Symbol->SectionNumber != COFF::IMAGE_SYM_DEBUG &&
|
||||
Symbol->SectionNumber != COFF::IMAGE_SYM_ABSOLUTE &&
|
||||
Symbol->SectionNumber != COFF::IMAGE_SYM_UNDEFINED) {
|
||||
const coff_aux_function_definition *Aux;
|
||||
if (error(getSymbolAuxData(Obj, Symbol + I, Aux)))
|
||||
break;
|
||||
@ -978,7 +959,7 @@ void COFFDumper::printSymbol(const SymbolRef &Sym) {
|
||||
DictScope AS(W, "AuxFunctionDef");
|
||||
W.printNumber("TagIndex", Aux->TagIndex);
|
||||
W.printNumber("TotalSize", Aux->TotalSize);
|
||||
W.printHex("PointerToLineNumber", Aux->PointerToLineNumber);
|
||||
W.printHex("PointerToLineNumber", Aux->PointerToLinenumber);
|
||||
W.printHex("PointerToNextFunction", Aux->PointerToNextFunction);
|
||||
W.printBinary("Unused", makeArrayRef(Aux->Unused));
|
||||
|
||||
@ -987,7 +968,7 @@ void COFFDumper::printSymbol(const SymbolRef &Sym) {
|
||||
(Symbol->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL &&
|
||||
Symbol->SectionNumber == COFF::IMAGE_SYM_UNDEFINED &&
|
||||
Symbol->Value == 0)) {
|
||||
const coff_aux_weak_external_definition *Aux;
|
||||
const coff_aux_weak_external *Aux;
|
||||
if (error(getSymbolAuxData(Obj, Symbol + I, Aux)))
|
||||
break;
|
||||
|
||||
@ -1004,7 +985,7 @@ void COFFDumper::printSymbol(const SymbolRef &Sym) {
|
||||
W.printNumber("Linked", LinkedName, Aux->TagIndex);
|
||||
W.printEnum ("Search", Aux->Characteristics,
|
||||
makeArrayRef(WeakExternalCharacteristics));
|
||||
W.printBinary("Unused", Aux->Unused);
|
||||
W.printBinary("Unused", makeArrayRef(Aux->Unused));
|
||||
|
||||
} else if (Symbol->StorageClass == COFF::IMAGE_SYM_CLASS_FILE) {
|
||||
const coff_aux_file_record *Aux;
|
||||
@ -1063,7 +1044,7 @@ void COFFDumper::printSymbol(const SymbolRef &Sym) {
|
||||
W.printNumber("AuxType", Aux->AuxType);
|
||||
W.printNumber("Reserved", Aux->Reserved);
|
||||
W.printNumber("SymbolTableIndex", ReferredName, Aux->SymbolTableIndex);
|
||||
W.printBinary("Unused", Aux->Unused);
|
||||
W.printBinary("Unused", makeArrayRef(Aux->Unused));
|
||||
|
||||
} else {
|
||||
W.startLine() << "<unhandled auxiliary record>\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user