mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 04:29:42 +02:00
powerpc-morphos: enable 'section' keyword support, and force the startup code to be in the .text section, to fix linking external objects with unnamed sections on this platform
This commit is contained in:
parent
f2a5bf17fc
commit
3695bb5da5
@ -318,7 +318,7 @@ interface
|
||||
systems_freertos = [system_xtensa_freertos,system_arm_freertos];
|
||||
|
||||
{ all systems that allow section directive }
|
||||
systems_allow_section = systems_embedded+systems_freertos+systems_wasm;
|
||||
systems_allow_section = systems_embedded+systems_freertos+systems_wasm+[system_powerpc_morphos];
|
||||
|
||||
{ systems that uses dotted function names as descriptors }
|
||||
systems_dotted_function_names = [system_powerpc64_linux]+systems_aix;
|
||||
|
@ -36,7 +36,12 @@ var
|
||||
procedure PascalMainEntry; cdecl; forward;
|
||||
|
||||
{ this function must be the first in this unit which contains code }
|
||||
function _FPC_proc_start: longint; cdecl; public name '_start';
|
||||
{ the startup code is forced to be in .text section, because the default
|
||||
linker script of MorphOS' GNU LD puts .text section first, and then
|
||||
all .text.* section, so if we link any object with an unnamed .text
|
||||
section, this won't be at the start of the executable, and we get
|
||||
crashes. (KB) }
|
||||
function _FPC_proc_start: longint; cdecl; public name '_start'; section '.text';
|
||||
var
|
||||
sst: TStackSwapStruct;
|
||||
newStack: Pointer;
|
||||
|
Loading…
Reference in New Issue
Block a user