Merged revisions 2058 via svnmerge from

svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk

r2058 (jonas)
  * final fixes for Mac OS X shared library creation: procedures declared
    as forward are no longer treated as external symbols
  * changed alloc_proc_symbol() to directly call newasmsymbol as opposed
    to creating a dummy tai_symbol()

git-svn-id: branches/fixes_2_0@2059 -
This commit is contained in:
Jonas Maebe 2005-12-26 18:33:00 +00:00
parent d2942b8ac1
commit 663d227178
2 changed files with 9 additions and 4 deletions

View File

@ -1655,7 +1655,6 @@ implementation
procedure alloc_proc_symbol(pd: tprocdef);
var
sym: tai_symbol;
item: tstringlistitem;
begin
item := tstringlistitem(pd.aliasnames.first);
@ -1663,10 +1662,9 @@ implementation
begin
if (cs_profile in aktmoduleswitches) or
(po_global in current_procinfo.procdef.procoptions) then
sym := Tai_symbol.createname_global(item.str,AT_FUNCTION,0)
objectlibrary.newasmsymbol(item.str,AB_GLOBAL,AT_FUNCTION)
else
sym := Tai_symbol.createname(item.str,AT_FUNCTION,0);
sym.free;
objectlibrary.newasmsymbol(item.str,AB_GLOBAL,AT_FUNCTION);
item := tstringlistitem(item.next);
end;
end;

View File

@ -1337,6 +1337,13 @@ implementation
{ Restore old state }
constsymtable:=oldconstsymtable;
{ make sure that references to forward-declared functions are not }
{ treated as references to external symbols, needed for darwin }
if (po_global in pd.procoptions) then
objectlibrary.newasmsymbol(pd.mangledname,AB_GLOBAL,AT_FUNCTION)
else
objectlibrary.newasmsymbol(pd.mangledname,AB_LOCAL,AT_FUNCTION);
current_procinfo:=old_current_procinfo;
end;