mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-25 05:04:58 -07:00
more merge fixes
This commit is contained in:
committed by
Ryan Fleury
parent
91ddd214b3
commit
7769a485ba
+26
-23
@@ -246,6 +246,31 @@ coff_pick_reloc_value_x64(COFF_Reloc_X64 type,
|
||||
return result;
|
||||
}
|
||||
|
||||
internal String8
|
||||
coff_make_lib_member_header(Arena *arena, String8 name, COFF_TimeStamp time_stamp, U16 user_id, U16 group_id, U16 mode, U32 size)
|
||||
{
|
||||
Assert(name.size < 16);
|
||||
Assert(user_id < 10000);
|
||||
Assert(group_id < 10000);
|
||||
Assert(mode < 10000);
|
||||
Assert(size < 1000000000);
|
||||
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
String8List list = {0};
|
||||
str8_list_pushf(scratch.arena, &list, "%-16.*s", str8_varg(name));
|
||||
str8_list_pushf(scratch.arena, &list, "%-12u", time_stamp);
|
||||
str8_list_pushf(scratch.arena, &list, "%-6u", user_id);
|
||||
str8_list_pushf(scratch.arena, &list, "%-6u", group_id);
|
||||
str8_list_pushf(scratch.arena, &list, "%-8u", mode);
|
||||
str8_list_pushf(scratch.arena, &list, "%-10u", size);
|
||||
str8_list_pushf(scratch.arena, &list, "`\n");
|
||||
String8 result = str8_list_join(arena, &list, 0);
|
||||
|
||||
Assert(result.size == sizeof(COFF_ArchiveMemberHeader));
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
}
|
||||
|
||||
internal String8
|
||||
coff_make_import_lookup(Arena *arena, U16 hint, String8 name)
|
||||
{
|
||||
@@ -314,6 +339,7 @@ coff_make_import_header(Arena *arena,
|
||||
header.machine = machine;
|
||||
header.time_stamp = time_stamp;
|
||||
header.data_size = safe_cast_u32(name.size + dll_name.size + 2);
|
||||
header.hint_or_ordinal = hint_or_ordinal;
|
||||
header.flags = flags;
|
||||
|
||||
// alloc memory
|
||||
@@ -910,27 +936,4 @@ coff_import_header_type_from_string(String8 name)
|
||||
}
|
||||
return COFF_ImportType_Invalid;
|
||||
}
|
||||
internal String8
|
||||
coff_make_lib_member_header(Arena *arena, String8 name, COFF_TimeStamp time_stamp, U16 user_id, U16 group_id, U16 mode, U32 size)
|
||||
{
|
||||
Assert(name.size < 16);
|
||||
Assert(user_id < 10000);
|
||||
Assert(group_id < 10000);
|
||||
Assert(mode < 10000);
|
||||
Assert(size < 1000000000);
|
||||
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
String8List list = {0};
|
||||
str8_list_pushf(scratch.arena, &list, "%-16.*s", str8_varg(name));
|
||||
str8_list_pushf(scratch.arena, &list, "%-12u", time_stamp);
|
||||
str8_list_pushf(scratch.arena, &list, "%-6u", user_id);
|
||||
str8_list_pushf(scratch.arena, &list, "%-6u", group_id);
|
||||
str8_list_pushf(scratch.arena, &list, "%-8u", mode);
|
||||
str8_list_pushf(scratch.arena, &list, "%-10u", size);
|
||||
str8_list_pushf(scratch.arena, &list, "`\n");
|
||||
String8 result = str8_list_join(arena, &list, 0);
|
||||
|
||||
Assert(result.size == sizeof(COFF_ArchiveMemberHeader));
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
}
|
||||
|
||||
+1
-1
@@ -611,6 +611,7 @@ internal U32 coff_make_ordinal32(U16 hint);
|
||||
internal U64 coff_make_ordinal64(U16 hint);
|
||||
internal String8 coff_ordinal_data_from_hint(Arena *arena, COFF_MachineType machine, U16 hint);
|
||||
|
||||
internal String8 coff_make_lib_member_header(Arena *arena, String8 name, COFF_TimeStamp time_stamp, U16 user_id, U16 group_id, U16 mode, U32 size);
|
||||
internal String8 coff_make_import_lookup(Arena *arena, U16 hint, String8 name);
|
||||
internal String8 coff_make_import_header(Arena *arena, COFF_MachineType machine, COFF_TimeStamp time_stamp, String8 dll_name, COFF_ImportByType import_by, String8 name, U16 hint_or_ordinal, COFF_ImportType type);
|
||||
|
||||
@@ -648,6 +649,5 @@ internal String8 coff_string_from_reloc(COFF_MachineType machine, COFF_RelocType
|
||||
|
||||
internal COFF_MachineType coff_machine_from_string(String8 string);
|
||||
internal COFF_ImportType coff_import_header_type_from_string(String8 name);
|
||||
internal String8 coff_make_lib_member_header(Arena *arena, String8 name, COFF_TimeStamp time_stamp, U16 user_id, U16 group_id, U16 mode, U32 size);
|
||||
|
||||
#endif // COFF_H
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
|
||||
#include "base/base_inc.h"
|
||||
#include "os/os_inc.h"
|
||||
#include "path/path.h"
|
||||
#include "coff/coff.h"
|
||||
#include "coff/coff_enum.h"
|
||||
#include "coff/coff_parse.h"
|
||||
#include "coff/coff_obj_writer.h"
|
||||
#include "coff/coff_lib_writer.h"
|
||||
@@ -29,9 +27,7 @@
|
||||
|
||||
#include "base/base_inc.c"
|
||||
#include "os/os_inc.c"
|
||||
#include "path/path.c"
|
||||
#include "coff/coff.c"
|
||||
#include "coff/coff_enum.c"
|
||||
#include "coff/coff_parse.c"
|
||||
#include "coff/coff_obj_writer.c"
|
||||
#include "coff/coff_lib_writer.c"
|
||||
|
||||
Reference in New Issue
Block a user