Browse Source

+ section smartlink bss for embedded targets

git-svn-id: trunk@13341 -
florian 16 years ago
parent
commit
86aad85b78
2 changed files with 6 additions and 5 deletions
  1. 4 3
      compiler/aggas.pas
  2. 2 2
      compiler/systems/i_embed.pas

+ 4 - 3
compiler/aggas.pas

@@ -375,7 +375,7 @@ implementation
           secname:='.tls';
 
         { go32v2 stub only loads .text and .data sections, and allocates space for .bss.
-          Thus, data which normally goes into .rodata and .rodata_norel sections must 
+          Thus, data which normally goes into .rodata and .rodata_norel sections must
           end up in .data section }
         if (atype in [sec_rodata,sec_rodata_norel]) and
           (target_info.system=system_i386_go32v2) then
@@ -387,8 +387,9 @@ implementation
         if not(target_info.system in systems_darwin) and
            create_smartlink_sections and
            (aname<>'') and
-           (atype <> sec_toc) and
-           (atype<>sec_bss) then
+           (atype<>sec_toc) and
+           { on embedded systems every byte counts, so smartlink bss too }
+           ((atype<>sec_bss) or (target_info.system in system_embedded)) then
           begin
             case aorder of
               secorder_begin :

+ 2 - 2
compiler/systems/i_embed.pas

@@ -33,8 +33,8 @@ unit i_embed;
             system       : system_arm_embedded;
             name         : 'Embedded';
             shortname    : 'embedded';
-            flags        : [tf_needs_symbol_size,tf_files_case_sensitive,tf_use_function_relative_addresses
-	                          ,tf_smartlink_sections];
+            flags        : [tf_needs_symbol_size,tf_files_case_sensitive,
+                            tf_use_function_relative_addresses,tf_smartlink_sections];
             cpu          : cpu_arm;
             unit_env     : '';
             extradefines : '';