diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-04-10 19:20:48 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-04-10 19:20:48 +0000 |
commit | 160cc1e115eeb75638dce6effdd16b2bc810ddb4 (patch) | |
tree | b791a95695a7cf674e61a6153139c6f9c6c491fa /compiler/ogelf.pas | |
parent | 3843727e74b31bbf2a34e7e3b89ee422269f770e (diff) | |
parent | 413a6aa6469e6c297780217a27ca91363c637944 (diff) | |
download | fpc-avr.tar.gz |
* rebase to trunk@17295avr
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/avr@17296 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ogelf.pas')
-rw-r--r-- | compiler/ogelf.pas | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/compiler/ogelf.pas b/compiler/ogelf.pas index 416cd4a95a..a3c164fb14 100644 --- a/compiler/ogelf.pas +++ b/compiler/ogelf.pas @@ -584,7 +584,7 @@ implementation function TElfObjData.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string; const - secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('', + secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('','', {$ifdef userodata} '.text','.data','.data','.rodata','.bss','.threadvar', {$else userodata} @@ -639,7 +639,7 @@ implementation '.obcj_nlcatlist', '.objc_protolist' ); - secnames_pic : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('', + secnames_pic : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('','', '.text', '.data.rel', '.data.rel', @@ -700,30 +700,36 @@ implementation sep : string[3]; secname : string; begin - if (cs_create_pic in current_settings.moduleswitches) and - not(target_info.system in systems_darwin) then - secname:=secnames_pic[atype] + { section type user gives the user full controll on the section name } + if atype=sec_user then + result:=aname else - secname:=secnames[atype]; - if (atype=sec_fpc) and (Copy(aname,1,3)='res') then begin - result:=secname+'.'+aname; - exit; + 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]; + if (atype=sec_fpc) and (Copy(aname,1,3)='res') then + begin + result:=secname+'.'+aname; + exit; + end; + if create_smartlink_sections and (aname<>'') then + begin + case aorder of + secorder_begin : + sep:='.b_'; + secorder_end : + sep:='.z_'; + else + sep:='.n_'; + end; + result:=secname+sep+aname + end + else + result:=secname; end; - if create_smartlink_sections and (aname<>'') then - begin - case aorder of - secorder_begin : - sep:='.b_'; - secorder_end : - sep:='.z_'; - else - sep:='.n_'; - end; - result:=secname+sep+aname - end - else - result:=secname; end; |