assign layout offsets and sizes to merged sections

This commit is contained in:
Nikita Smith
2025-06-25 10:53:22 -07:00
committed by Ryan Fleury
parent f75cdd23d7
commit 03e4958190
4 changed files with 95 additions and 32 deletions
+2 -3
View File
@@ -1436,12 +1436,11 @@ lnk_apply_cmd_option_to_config(Arena *arena, LNK_Config *config, String8 cmd_nam
case LNK_CmdSwitch_Merge: {
if (value_strings.node_count == 1) {
LNK_MergeDirective merge = {0};;
LNK_MergeDirective merge = {0};
if (lnk_parse_merge_directive(push_str8_copy(arena, value_strings.first->string), &merge)) {
lnk_merge_directive_list_push(arena, &config->merge_list, merge);
} else {
lnk_error_cmd_switch(LNK_Warning_InvalidMergeDirectiveFormat, obj_path, lib_path, cmd_switch, "invalid merge directive format expected \"/MERGE:FROM=TO\" but got \"%S\"",
value_strings.first->string);
lnk_error_cmd_switch(LNK_Warning_InvalidMergeDirectiveFormat, obj_path, lib_path, cmd_switch, "unable to parse merge directive, expected format \"/MERGE:FROM=TO\" but got \"%S\"", value_strings.first->string);
}
} else {
lnk_error_cmd_switch(LNK_Error_Cmdl, obj_path, lib_path, cmd_switch, "invalid number of parameters %d", value_strings.node_count);