summaryrefslogtreecommitdiff
path: root/compiler/ogelf.pas
diff options
context:
space:
mode:
authorsergei <sergei@3ad0048d-3df7-0310-abae-a5850022a9f2>2012-11-02 08:03:54 +0000
committersergei <sergei@3ad0048d-3df7-0310-abae-a5850022a9f2>2012-11-02 08:03:54 +0000
commit26bea6d457b343cf19c1ef8bb5f14f655b3325ee (patch)
treeeb0d5eb98d2d99c6b5a363c1467a33c2f354a528 /compiler/ogelf.pas
parentd2fcb048145347c14a6a02852a36a0766b3879d9 (diff)
downloadfpc-26bea6d457b343cf19c1ef8bb5f14f655b3325ee.tar.gz
- Removed generic implementation of TObjData.sectionname, its existence is useless because it is completely overridden by all TObjData descendants.
- Removed separate ELF section names for PIC. The only difference was .data named .data.rel; however .rel suffix has nothing to do with PIC. It only signifies that the section has relocations so such sections can be grouped together in output file and reduce number of pages for dynamic linker to visit while resolving the relocations at load time. At the same time, no existing link scripts distinguish between .rel and any other suffix (except .rel.ro, but it's a different story), meaning that long section names will break .rel grouping. While support for .data.rel can be added similar to existing rodata handling (separate sec_data and sec_data_norel sections), this doesn't seem worth the trouble. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22915 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ogelf.pas')
-rw-r--r--compiler/ogelf.pas63
1 files changed, 1 insertions, 62 deletions
diff --git a/compiler/ogelf.pas b/compiler/ogelf.pas
index e4e6481b9d..73776e6c20 100644
--- a/compiler/ogelf.pas
+++ b/compiler/ogelf.pas
@@ -1001,63 +1001,6 @@ implementation
'.obcj_nlcatlist',
'.objc_protolist'
);
- secnames_pic : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('','',
- '.text',
- '.data.rel',
- '.data.rel',
- '.data.rel',
- '.bss',
- '.threadvar',
- '.pdata',
- '', { stubs }
- '__DATA,__nl_symbol_ptr',
- '__DATA,__la_symbol_ptr',
- '__DATA,__mod_init_func',
- '__DATA,__mod_term_func',
- '.stab',
- '.stabstr',
- '.idata$2','.idata$4','.idata$5','.idata$6','.idata$7','.edata',
- '.eh_frame',
- '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
- '.fpc',
- '.toc',
- '.init',
- '.fini',
- '.objc_class',
- '.objc_meta_class',
- '.objc_cat_cls_meth',
- '.objc_cat_inst_meth',
- '.objc_protocol',
- '.objc_string_object',
- '.objc_cls_meth',
- '.objc_inst_meth',
- '.objc_cls_refs',
- '.objc_message_refs',
- '.objc_symbols',
- '.objc_category',
- '.objc_class_vars',
- '.objc_instance_vars',
- '.objc_module_info',
- '.objc_class_names',
- '.objc_meth_var_types',
- '.objc_meth_var_names',
- '.objc_selector_strs',
- '.objc_protocol_ext',
- '.objc_class_ext',
- '.objc_property',
- '.objc_image_info',
- '.objc_cstring_object',
- '.objc_sel_fixup',
- '__DATA,__objc_data',
- '__DATA,__objc_const',
- '.objc_superrefs',
- '__DATA, __datacoal_nt,coalesced',
- '.objc_classlist',
- '.objc_nlclasslist',
- '.objc_catlist',
- '.obcj_nlcatlist',
- '.objc_protolist'
- );
var
sep : string[3];
secname : string;
@@ -1067,11 +1010,7 @@ implementation
result:=aname
else
begin
- if (cs_create_pic in current_settings.moduleswitches) and
- not(target_info.system in systems_darwin) then
- secname:=secnames_pic[atype]
- else
- secname:=secnames[atype];
+ secname:=secnames[atype];
if (atype=sec_fpc) and (Copy(aname,1,3)='res') then
begin
result:=secname+'.'+aname;