mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 01:39:27 +02:00
* check also procedure aliases for duplicate names when
generating an export stub git-svn-id: trunk@5993 -
This commit is contained in:
parent
30e78b71c8
commit
c9703d43d5
@ -72,6 +72,7 @@ interface
|
||||
|
||||
function maybe_pushfpu(list:TAsmList;needed : byte;var l:tlocation) : boolean;
|
||||
|
||||
function has_alias_name(pd:tprocdef;const s:string):boolean;
|
||||
procedure alloc_proc_symbol(pd: tprocdef);
|
||||
procedure gen_proc_symbol(list:TAsmList);
|
||||
procedure gen_proc_symbol_end(list:TAsmList);
|
||||
@ -1885,9 +1886,27 @@ implementation
|
||||
Entry/Exit
|
||||
****************************************************************************}
|
||||
|
||||
function has_alias_name(pd:tprocdef;const s:string):boolean;
|
||||
var
|
||||
item : tstringlistitem;
|
||||
begin
|
||||
result:=true;
|
||||
if pd.mangledname=s then
|
||||
exit;
|
||||
item := tstringlistitem(pd.aliasnames.first);
|
||||
while assigned(item) do
|
||||
begin
|
||||
if item.str=s then
|
||||
exit;
|
||||
item := tstringlistitem(item.next);
|
||||
end;
|
||||
result:=false;
|
||||
end;
|
||||
|
||||
|
||||
procedure alloc_proc_symbol(pd: tprocdef);
|
||||
var
|
||||
item: tstringlistitem;
|
||||
var
|
||||
item : tstringlistitem;
|
||||
begin
|
||||
item := tstringlistitem(pd.aliasnames.first);
|
||||
while assigned(item) do
|
||||
|
@ -71,7 +71,7 @@ implementation
|
||||
symconst,script,
|
||||
fmodule,
|
||||
aasmbase,aasmtai,aasmdata,aasmcpu,cpubase,
|
||||
cgbase,cgobj,cgutils,ogbase,
|
||||
cgbase,cgobj,cgutils,ogbase,ncgutil,
|
||||
i_linux
|
||||
;
|
||||
|
||||
@ -164,7 +164,7 @@ begin
|
||||
{ the manglednames can already be the same when the procedure
|
||||
is declared with cdecl }
|
||||
pd:=tprocdef(tprocsym(hp2.sym).ProcdefList[0]);
|
||||
if pd.mangledname<>hp2.name^ then
|
||||
if has_alias_name(pd,hp2.name^) then
|
||||
begin
|
||||
{ place jump in al_procedures }
|
||||
current_asmdata.asmlists[al_procedures].concat(tai_align.create(target_info.alignment.procalign));
|
||||
|
Loading…
Reference in New Issue
Block a user