From b6e397b959fac53acddd53d4fbe27949be31daef Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sat, 14 Dec 2019 16:16:05 -0500 Subject: [PATCH] add SEG command (does nothing, yet) --- link.cpp | 6 ++++++ ops.h | 1 + script.re2c | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/link.cpp b/link.cpp index 7e0b124..c827fba 100644 --- a/link.cpp +++ b/link.cpp @@ -816,6 +816,12 @@ void evaluate(label_t label, opcode_t opcode, const char *cursor) { define(label, number_operand(cursor, local_symbol_table), LBL_GEQ); break; + case OP_SEG: { + /* OMF object file linker - set the object file seg name */ + std::string name = label_operand(cursor); + break; + } + case OP_FAS: /* fast linker, only 1 file allowed */ fas = true; diff --git a/ops.h b/ops.h index 737a558..de5517a 100644 --- a/ops.h +++ b/ops.h @@ -36,3 +36,4 @@ x(CMD) x(ZIP) x(IMP) x(PFX) +x(SEG) diff --git a/script.re2c b/script.re2c index 41c8e47..c274d9a 100644 --- a/script.re2c +++ b/script.re2c @@ -222,7 +222,7 @@ std::string path_operand(const char *YYCURSOR, int flags) { } // don't allow leading quotes, eof, or comment chars - . [^ \t]* { + [^ \t\x00;*'"][^ \t\x00]* { rv = std::string(iter, YYCURSOR); goto exit; }