mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-02 12:08:11 +00:00
pass over COFF layer
- updated naming convention on structs, enums, and macros to conform with code base style - moved related structs closer to each other - moved parser code to separate file
This commit is contained in:
@@ -82,22 +82,22 @@ lnk_export_table_push_export(LNK_ExportTable *exptab, LNK_SymbolTable *symtab, L
|
||||
// to CODE instead of DATA. But if you try export global variable with:
|
||||
// #pragma comment(linker, "/export:global_bar,CODE")
|
||||
// MSVC and LLD issue an error. For compatibility sake we do the same thing too.
|
||||
COFF_ImportHeaderType type = coff_import_header_type_from_string(exp_parse->type);
|
||||
COFF_ImportType type = coff_import_header_type_from_string(exp_parse->type);
|
||||
switch (type) {
|
||||
case COFF_ImportHeaderType_CODE: {
|
||||
case COFF_ImportHeader_Code: {
|
||||
B32 is_export_data = !(def->flags & (LNK_DefinedSymbolFlag_IsFunc|LNK_DefinedSymbolFlag_IsThunk));
|
||||
if (is_export_data) {
|
||||
lnk_error(LNK_Error_IllExport, "export \"%S\" is DATA but has specifier CODE", exp_parse->name);
|
||||
}
|
||||
} break;
|
||||
case COFF_ImportHeaderType_DATA: {
|
||||
case COFF_ImportHeader_Data: {
|
||||
B32 is_export_code = !!(def->flags & (LNK_DefinedSymbolFlag_IsFunc|LNK_DefinedSymbolFlag_IsThunk));
|
||||
if (is_export_code) {
|
||||
lnk_error(LNK_Error_IllExport, "export \"%S\" is CODE but has specifier DATA", exp_parse->name);
|
||||
}
|
||||
} break;
|
||||
case COFF_ImportHeaderType_CONST: {
|
||||
lnk_not_implemented("TODO: COFF_ImportHeaderType_CONST");
|
||||
case COFF_ImportHeader_Const: {
|
||||
lnk_not_implemented("TODO: COFF_ImportHeader_Const");
|
||||
} break;
|
||||
default: {
|
||||
if (exp_parse->type.size) {
|
||||
|
||||
Reference in New Issue
Block a user