mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-06 00:27:22 +01:00
* fix compilation on PE/COFF based systems with GNU AS as there the progbits are not supported
git-svn-id: trunk@43345 -
This commit is contained in:
parent
e19eff1332
commit
f481587bee
@ -474,10 +474,12 @@ implementation
|
||||
var
|
||||
s : string;
|
||||
secflag: TSectionFlag;
|
||||
sectionprogbits,
|
||||
sectionflags: boolean;
|
||||
begin
|
||||
writer.AsmLn;
|
||||
sectionflags:=false;
|
||||
sectionprogbits:=false;
|
||||
case target_info.system of
|
||||
system_i386_OS2,
|
||||
system_i386_EMX: ;
|
||||
@ -489,8 +491,19 @@ implementation
|
||||
begin
|
||||
writer.AsmWrite('.section ');
|
||||
sectionflags:=true;
|
||||
sectionprogbits:=true;
|
||||
end;
|
||||
end;
|
||||
system_i386_win32,
|
||||
system_x86_64_win64,
|
||||
system_i386_wince,
|
||||
system_arm_wince:
|
||||
begin
|
||||
{ according to the GNU AS guide AS for COFF does not support the
|
||||
progbits }
|
||||
writer.AsmWrite('.section ');
|
||||
sectionflags:=true;
|
||||
end;
|
||||
system_powerpc_darwin,
|
||||
system_i386_darwin,
|
||||
system_i386_iphonesim,
|
||||
@ -509,38 +522,45 @@ implementation
|
||||
begin
|
||||
writer.AsmWrite('.section ');
|
||||
sectionflags:=true;
|
||||
sectionprogbits:=true;
|
||||
end
|
||||
end;
|
||||
s:=sectionname(atype,aname,aorder);
|
||||
writer.AsmWrite(s);
|
||||
{ flags explicitly defined? }
|
||||
if sectionflags and
|
||||
if (sectionflags or sectionprogbits) and
|
||||
((secflags<>[]) or
|
||||
(secprogbits<>SPB_None)) then
|
||||
begin
|
||||
s:=',"';
|
||||
for secflag in secflags do
|
||||
case secflag of
|
||||
SF_A:
|
||||
s:=s+'a';
|
||||
SF_W:
|
||||
s:=s+'w';
|
||||
SF_X:
|
||||
s:=s+'x';
|
||||
if sectionflags then
|
||||
begin
|
||||
s:=',"';
|
||||
for secflag in secflags do
|
||||
case secflag of
|
||||
SF_A:
|
||||
s:=s+'a';
|
||||
SF_W:
|
||||
s:=s+'w';
|
||||
SF_X:
|
||||
s:=s+'x';
|
||||
end;
|
||||
writer.AsmWrite(s+'"');
|
||||
end;
|
||||
if sectionprogbits then
|
||||
begin
|
||||
case secprogbits of
|
||||
SPB_PROGBITS:
|
||||
writer.AsmWrite(',%progbits');
|
||||
SPB_NOBITS:
|
||||
writer.AsmWrite(',%nobits');
|
||||
SPB_NOTE:
|
||||
writer.AsmWrite(',%note');
|
||||
SPB_None:
|
||||
;
|
||||
else
|
||||
InternalError(2019100801);
|
||||
end;
|
||||
end;
|
||||
writer.AsmWrite(s+'"');
|
||||
case secprogbits of
|
||||
SPB_PROGBITS:
|
||||
writer.AsmWrite(',%progbits');
|
||||
SPB_NOBITS:
|
||||
writer.AsmWrite(',%nobits');
|
||||
SPB_NOTE:
|
||||
writer.AsmWrite(',%note');
|
||||
SPB_None:
|
||||
;
|
||||
else
|
||||
InternalError(2019100801);
|
||||
end;
|
||||
end
|
||||
else
|
||||
case atype of
|
||||
|
||||
Loading…
Reference in New Issue
Block a user