Explorar o código

Try to avoid inserting all RTTI symbols into executables on targets not supporting smartlinked sections

git-svn-id: trunk@39121 -
pierre %!s(int64=7) %!d(string=hai) anos
pai
achega
a1bbd4c02d
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  1. 8 1
      compiler/aasmcnst.pas

+ 8 - 1
compiler/aasmcnst.pas

@@ -960,7 +960,14 @@ implementation
            new_section(prelist,section,secname,alignment);
          end
        else if tcalo_new_section in options then
-         new_section(prelist,section,secname,alignment)
+         begin
+           { insert ait_cutobject for smart-linking on targets
+             that do not support smarlinking based on sections,
+             like msdos }
+           if not (tf_smartlink_sections in target_info.flags) then
+             maybe_new_object_file(prelist);
+           new_section(prelist,section,secname,alignment);
+         end
        else
          prelist.concat(cai_align.Create(alignment));