Переглянути джерело

* register the start and end symbols of resource strings in the extern assembler list of the program/library
* export the start and end symbols of resource strings from the package

git-svn-id: trunk@34186 -

svenbarth 9 роки тому
батько
коміт
ccb4b23949
2 змінених файлів з 8 додано та 3 видалено
  1. 2 2
      compiler/ngenutil.pas
  2. 6 1
      compiler/pkgutil.pas

+ 2 - 2
compiler/ngenutil.pas

@@ -1250,11 +1250,11 @@ implementation
           If (hp.flags and uf_has_resourcestrings)=uf_has_resourcestrings then
           If (hp.flags and uf_has_resourcestrings)=uf_has_resourcestrings then
             begin
             begin
               tcb.emit_tai(Tai_const.Create_sym(
               tcb.emit_tai(Tai_const.Create_sym(
-                ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_start('RESSTR',hp.localsymtable,[tcdssso_use_indirect])),
+                ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_start('RESSTR',hp.localsymtable,[tcdssso_register_asmsym,tcdssso_use_indirect])),
                 voidpointertype
                 voidpointertype
               );
               );
               tcb.emit_tai(Tai_const.Create_sym(
               tcb.emit_tai(Tai_const.Create_sym(
-                ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_end('RESSTR',hp.localsymtable,[tcdssso_use_indirect])),
+                ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_end('RESSTR',hp.localsymtable,[tcdssso_register_asmsym,tcdssso_use_indirect])),
                 voidpointertype
                 voidpointertype
               );
               );
               inc(count);
               inc(count);

+ 6 - 1
compiler/pkgutil.pas

@@ -45,7 +45,7 @@ implementation
     globtype,systems,
     globtype,systems,
     cutils,
     cutils,
     globals,verbose,
     globals,verbose,
-    aasmbase,aasmdata,
+    aasmbase,aasmdata,aasmcnst,
     symtype,symconst,symsym,symdef,symbase,symtable,
     symtype,symconst,symsym,symdef,symbase,symtable,
     psub,pdecsub,
     psub,pdecsub,
     ncgutil,
     ncgutil,
@@ -216,6 +216,11 @@ implementation
         procexport(make_mangledname('FINALIZE$',u.globalsymtable,''));
         procexport(make_mangledname('FINALIZE$',u.globalsymtable,''));
       if (u.flags and uf_threadvars)=uf_threadvars then
       if (u.flags and uf_threadvars)=uf_threadvars then
         varexport(make_mangledname('THREADVARLIST',u.globalsymtable,''));
         varexport(make_mangledname('THREADVARLIST',u.globalsymtable,''));
+      if (u.flags and uf_has_resourcestrings)<>0 then
+        begin
+          varexport(ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_start('RESSTR',u.localsymtable,[]).name);
+          varexport(ctai_typedconstbuilder.get_vectorized_dead_strip_section_symbol_end('RESSTR',u.localsymtable,[]).name);
+        end;
     end;
     end;
 
 
   Function RewritePPU(const PPUFn:String;OutStream:TCStream):Boolean;
   Function RewritePPU(const PPUFn:String;OutStream:TCStream):Boolean;