--- compiler/rautils-orig.pas	2024-11-17 18:37:53
+++ compiler/rautils.pas	2025-03-28 01:01:27
@@ -1781,6 +1781,11 @@
       begin
         if symtablestack.top.symtablelevel<>srsymtable.symtablelevel then
           begin
+{$ifndef LLVM}
+            { LLVM compiler requires that the static label RawThunkEnd
+             in packages/rtl-objpas/src/rtti.pp unit is set to nonlocal }
+            if (srsymtable.symtabletype=globalsymtable) or create_smartlink_library then
+{$endif LLVM}
             Tlabelsym(sym).nonlocal:=true;
             if emit then
               include(current_procinfo.flags,pi_has_interproclabel);
