mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-05 15:51:03 +01:00
Support .set and .weak in internal assembler.
Fix problem with fpc_initialHeap getting put in .data instead of .bss. git-svn-id: trunk@30233 -
This commit is contained in:
parent
2555f12394
commit
155998fe89
@ -1386,6 +1386,7 @@ Implementation
|
||||
leblen : byte;
|
||||
lebbuf : array[0..63] of byte;
|
||||
objsym,
|
||||
ref,
|
||||
objsymend : TObjSymbol;
|
||||
zerobuf : array[0..63] of byte;
|
||||
relative_reloc: boolean;
|
||||
@ -1541,6 +1542,22 @@ Implementation
|
||||
ait_cutobject :
|
||||
if SmartAsm then
|
||||
break;
|
||||
ait_weak:
|
||||
begin
|
||||
objsym:=ObjData.symbolref(tai_weak(hp).sym^);
|
||||
objsym.bind:=AB_WEAK_EXTERNAL;
|
||||
end;
|
||||
ait_set:
|
||||
begin
|
||||
objsym:=ObjData.symbolref(tai_set(hp).sym^);
|
||||
ref:=objdata.symbolref(tai_set(hp).value^);
|
||||
|
||||
objsym.offset:=ref.offset;
|
||||
objsym.objsection:=ref.objsection;
|
||||
{$ifdef arm}
|
||||
objsym.ThumbFunc:=ref.ThumbFunc;
|
||||
{$endif arm}
|
||||
end;
|
||||
{$ifndef DISABLE_WIN64_SEH}
|
||||
ait_seh_directive :
|
||||
tai_seh_directive(hp).generate_code(objdata);
|
||||
|
||||
@ -975,7 +975,7 @@ implementation
|
||||
if target_info.system in systems_embedded then
|
||||
begin
|
||||
maybe_new_object_file(current_asmdata.asmlists[al_globals]);
|
||||
new_section(current_asmdata.asmlists[al_globals],sec_data,'__fpc_initialheap',current_settings.alignment.varalignmax);
|
||||
new_section(current_asmdata.asmlists[al_globals],sec_bss,'__fpc_initialheap',current_settings.alignment.varalignmax);
|
||||
current_asmdata.asmlists[al_globals].concat(tai_datablock.Create_global('__fpc_initialheap',heapsize));
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user