From 30d26b78280c33621e852bfafd7a4c8d08f650db Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sun, 22 Dec 2019 14:43:12 -0500 Subject: [PATCH] merlin uses the same loadname for all segments. --- link.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/link.cpp b/link.cpp index bc43d2d..a4b1557 100644 --- a/link.cpp +++ b/link.cpp @@ -175,6 +175,7 @@ namespace { std::unordered_map local_symbol_table; + std::string loadname; } @@ -917,6 +918,7 @@ void evaluate(label_t label, opcode_t opcode, const char *cursor) { /* use 1st SAV as the path */ if (save_file.empty()) save_file = path; + if (loadname.empty()) loadname = base; /* lkv 0 = binary linker (unsupported) @@ -929,7 +931,7 @@ void evaluate(label_t label, opcode_t opcode, const char *cursor) { /* merlin link uses a 10-char fixed label */ //base.resize(10, ' '); seg.segname = base; - seg.loadname = base; + seg.loadname = loadname; // seg.kind = kind; }