New export option that enforces the use of the provided export name instead of using the name of the provided symbol. This is necessary to correctly handle overloaded functions, especially if one of them is an internproc one.

export.pas:
  + texportoption: new option eo_no_sym_name
pkgutil.pas:
  * exportprocsym: set eo_no_sym_name when exporting procdefs from a package
systems/t_win.pas, TExportLibWin:
  * generatelib: respect eo_no_sym_name

git-svn-id: trunk@33574 -
This commit is contained in:
svenbarth 2016-04-29 15:03:18 +00:00
parent 8416517b14
commit adbef4fc84
3 changed files with 4 additions and 3 deletions

View File

@ -36,7 +36,8 @@ type
texportoption=(eo_none,
eo_resident,
eo_index,
eo_name
eo_name,
eo_no_sym_name { don't try to use another mangled name if symbol is known }
);
texportoptions=set of texportoption;

View File

@ -91,7 +91,7 @@ implementation
)
) then
begin
exportallprocdefnames(tprocsym(sym),pd,[]);
exportallprocdefnames(tprocsym(sym),pd,[eo_name,eo_no_sym_name]);
end;
end;
end;

View File

@ -871,7 +871,7 @@ implementation
end;
{ symbol known? then get a new name }
if assigned(hp.sym) then
if assigned(hp.sym) and not (eo_no_sym_name in hp.options) then
case hp.sym.typ of
staticvarsym :
asmsym:=current_asmdata.RefAsmSymbol(tstaticvarsym(hp.sym).mangledname);