Browse Source

- Do not create any default object sections. On targets with section-based smartlink these sections remain empty and only cause linker to do useless job of removing them. The same happens when loading object files because duplicate section names are allowed at that time. On targets without smartlink they don't stay empty, but the internal assembler creates sections when required, so not creating initial sections effectively doesn't change anything.

git-svn-id: trunk@22049 -
sergei 13 years ago
parent
commit
95535ea845
2 changed files with 0 additions and 19 deletions
  1. 0 6
      compiler/ogcoff.pas
  2. 0 13
      compiler/ogelf.pas

+ 0 - 6
compiler/ogcoff.pas

@@ -981,12 +981,6 @@ const pemagic : array[0..3] of byte = (
         inherited create(n);
         CObjSection:=ACObjSection;
         win32:=awin32;
-        { we need at least the following 3 ObjSections }
-        createsection(sec_code);
-        createsection(sec_data);
-        createsection(sec_bss);
-        if tf_section_threadvars in target_info.flags then
-          createsection(sec_threadvar);
       end;
 
 

+ 0 - 13
compiler/ogelf.pas

@@ -801,19 +801,6 @@ implementation
       begin
         inherited create(n);
         CObjSection:=TElfObjSection;
-        { we need at least the following sections }
-        createsection(sec_code);
-        { always a non-PIC data section (will remain empty if doing PIC) }
-        createsection('.data',sectiontype2align(sec_data),sectiontype2options(sec_data));
-        createsection(sec_bss);
-        if (cs_create_pic in current_settings.moduleswitches) and
-           not(target_info.system in systems_darwin) then
-          createsection(sec_data);
-        if tf_section_threadvars in target_info.flags then
-          createsection(sec_threadvar);
-        if (tf_needs_dwarf_cfi in target_info.flags) and
-           (af_supports_dwarf in target_asm.flags) then
-             createsection(sec_debug_frame);
       end;