Browse Source

* applied fix for #41161 as proposed by Pierre

florian 5 months ago
parent
commit
fd72ed8c56
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/ncgcon.pas

+ 4 - 1
compiler/ncgcon.pas

@@ -134,7 +134,10 @@ implementation
              { :-(, we must generate a new entry }
              { :-(, we must generate a new entry }
              if not(assigned(lab_real)) then
              if not(assigned(lab_real)) then
                begin
                begin
-                  current_asmdata.getlocaldatalabel(lastlabel);
+                  if create_smartlink_library then
+                    current_asmdata.getglobaldatalabel(lastlabel)
+                  else
+                    current_asmdata.getlocaldatalabel(lastlabel);
                   entry^.Data:=lastlabel;
                   entry^.Data:=lastlabel;
                   lab_real:=lastlabel;
                   lab_real:=lastlabel;
                   maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
                   maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);