mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-27 11:06:26 +02:00
* support section names with length > 8
git-svn-id: trunk@2304 -
This commit is contained in:
parent
c297cb1569
commit
2ee18b3d8c
@ -167,7 +167,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
strings,
|
strings,
|
||||||
cutils,verbose,
|
cutils,verbose,
|
||||||
globals,fmodule;
|
globals,fmodule,aasmtai;
|
||||||
|
|
||||||
const
|
const
|
||||||
COFF_FLAG_NORELOCS = $0001;
|
COFF_FLAG_NORELOCS = $0001;
|
||||||
@ -564,9 +564,15 @@ const go32v2stub : array[0..2047] of byte=(
|
|||||||
'.fpc',
|
'.fpc',
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
var
|
||||||
|
secname : string;
|
||||||
begin
|
begin
|
||||||
{ No support for named sections, because section names are limited to 8 chars }
|
secname:=secnames[atype];
|
||||||
result:=secnames[atype];
|
if use_smartlink_section and
|
||||||
|
(aname<>'') then
|
||||||
|
result:=secname+'$'+aname
|
||||||
|
else
|
||||||
|
result:=secname;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -878,9 +884,9 @@ const go32v2stub : array[0..2047] of byte=(
|
|||||||
procedure tcoffobjectoutput.write_symbols(data:TAsmObjectData);
|
procedure tcoffobjectoutput.write_symbols(data:TAsmObjectData);
|
||||||
var
|
var
|
||||||
filename : string[18];
|
filename : string[18];
|
||||||
value : longint;
|
|
||||||
sectionval,
|
sectionval,
|
||||||
globalval : byte;
|
globalval,
|
||||||
|
value : longint;
|
||||||
p : tasmsymbol;
|
p : tasmsymbol;
|
||||||
begin
|
begin
|
||||||
with tcoffobjectdata(data) do
|
with tcoffobjectdata(data) do
|
||||||
@ -946,12 +952,17 @@ const go32v2stub : array[0..2047] of byte=(
|
|||||||
var
|
var
|
||||||
sechdr : coffsechdr;
|
sechdr : coffsechdr;
|
||||||
s : string;
|
s : string;
|
||||||
|
strpos : longint;
|
||||||
begin
|
begin
|
||||||
fillchar(sechdr,sizeof(sechdr),0);
|
fillchar(sechdr,sizeof(sechdr),0);
|
||||||
s:=tasmsection(p).name;
|
s:=tasmsection(p).name;
|
||||||
{ section names are limited to 8 chars }
|
|
||||||
if length(s)>8 then
|
if length(s)>8 then
|
||||||
internalerror(200403312);
|
begin
|
||||||
|
strpos:=FCoffStrs.size+4;
|
||||||
|
FCoffStrs.writestr(s);
|
||||||
|
FCoffStrs.writestr(#0);
|
||||||
|
s:='/'+ToStr(strpos);
|
||||||
|
end;
|
||||||
move(s[1],sechdr.name,length(s));
|
move(s[1],sechdr.name,length(s));
|
||||||
if not win32 then
|
if not win32 then
|
||||||
begin
|
begin
|
||||||
@ -1713,7 +1724,7 @@ const go32v2stub : array[0..2047] of byte=(
|
|||||||
asmbin : '';
|
asmbin : '';
|
||||||
asmcmd : '';
|
asmcmd : '';
|
||||||
supported_target : system_i386_win32;
|
supported_target : system_i386_win32;
|
||||||
flags : [af_outputbinary];
|
flags : [af_outputbinary,af_smartlink_sections];
|
||||||
labelprefix : '.L';
|
labelprefix : '.L';
|
||||||
comment : '';
|
comment : '';
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user