+ emit .type directives for ait_symbolpair on targets that have tf_needs_symbol_type

git-svn-id: branches/wasm@47002 -
This commit is contained in:
nickysn 2020-09-29 12:18:34 +00:00
parent da5c9a978e
commit b230e295fa

View File

@ -1428,6 +1428,10 @@ implementation
{ the .localentry directive has to specify the size from the
start till here of the non-local entry code as second argument }
s:=', .-';
if ((target_info.system <> system_arm_linux) and (target_info.system <> system_arm_android)) then
sepChar := '@'
else
sepChar := '#';
if replaceforbidden then
begin
{ avoid string truncation }
@ -1439,6 +1443,11 @@ implementation
writer.AsmWrite(#9'.globl ');
writer.AsmWriteLn(ApplyAsmSymbolRestrictions(tai_symbolpair(hp).sym^));
end;
if (tf_needs_symbol_type in target_info.flags) then
begin
writer.AsmWrite(#9'.type'#9 + ApplyAsmSymbolRestrictions(tai_symbolpair(hp).sym^));
writer.AsmWriteLn(',' + sepChar + 'function');
end;
end
else
begin
@ -1451,6 +1460,11 @@ implementation
writer.AsmWrite(#9'.globl ');
writer.AsmWriteLn(tai_symbolpair(hp).sym^);
end;
if (tf_needs_symbol_type in target_info.flags) then
begin
writer.AsmWrite(#9'.type'#9 + tai_symbolpair(hp).sym^);
writer.AsmWriteLn(',' + sepChar + 'function');
end;
end;
end;
ait_symbol_end :