Only error when not undefined master
authorRobert Pengelly <robertapengelly@hotmail.com>
Wed, 20 May 2026 05:51:51 +0000 (06:51 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Wed, 20 May 2026 05:51:51 +0000 (06:51 +0100)
intel.c

diff --git a/intel.c b/intel.c
index b4e59e1984d80f1a3d84af6553836a0df5f08461..9c012136d58dab350c27ffe83be2ed9731bf4c79 100644 (file)
--- a/intel.c
+++ b/intel.c
@@ -1946,7 +1946,7 @@ static void handler_extern (char *start, char **pp) {
         
         if ((symbol = symbol_find (name))) {
         
         
         if ((symbol = symbol_find (name))) {
         
-            if (symbol->scope == SYMBOL_SCOPE_LOCAL || symbol->scope == SYMBOL_SCOPE_GLOBAL) {
+            if (symbol->section != undefined_section && (symbol->scope == SYMBOL_SCOPE_LOCAL || symbol->scope == SYMBOL_SCOPE_GLOBAL)) {
                 report_line_at (get_filename (), get_line_number (), REPORT_ERROR, start, caret, "symbol '%s' is already defined", name);
             } else {
             
                 report_line_at (get_filename (), get_line_number (), REPORT_ERROR, start, caret, "symbol '%s' is already defined", name);
             } else {