mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:09:33 +02:00
- 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 -
This commit is contained in:
parent
393f1d58ed
commit
95535ea845
@ -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;
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user