mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 05:29:34 +01:00
Every startup code must now provide an additional entry point called "_dynamic_start" that is set as new the entry point if the program links to a Pascal shared library. Its purpose is to set up an exit hook usually passed via a register, which should be called during program finalization if non-nil. We use this additional entry point because this register only has meaningful content when there are any compile-time linked shared libraries, otherwise it often contains random garbage. The difference between the _dynamic_start and the original code is minimal; actually in all implementations the _dynamic_start code passes on control to the old startup code, so we use an additional entry point instead of an additional startup file. Detailed changes and fixes list: compiler: always link to the dynamic loader (ld.so) when compiling shared libraries. Fixes crashes in the loader during shared library finalization on some Linuxes remove additional ENTRY() section in arm linker script select either _dynamic_start or _start as entry point depending on whether this is a static or dynamic executable powerpc*: do not set System.isLibrary in startup code, it will be set during library initialization anyway trap in case of reaching code locations that should not be reached instead of looping (possibly endlessly) powerpc: register atexit() function pointer if supplied to the executable and call it during shutdown correctly set argc/argv/envp in shared library code and return correctly to the caller after initialization pass on exitcode in shared library haltproc use the more recent exit_group system call if available for shutdown powerpc64 fix .ptrgl stub, do not set the environment register to the value of the GOT entry in the function descriptor arm do not set System.isLibrary in startup code, it will be set during library initialization anyway reload exitcode to pass to shutdown mips,mipsel,sparc added stubs to allow correct linking git-svn-id: trunk@19036 - |
||
|---|---|---|
| .. | ||
| amiga | ||
| arm | ||
| atari | ||
| avr | ||
| beos | ||
| bsd | ||
| darwin | ||
| embedded | ||
| emx | ||
| freebsd | ||
| gba | ||
| go32v2 | ||
| haiku | ||
| i386 | ||
| inc | ||
| linux | ||
| m68k | ||
| macos | ||
| mips | ||
| mipsel | ||
| morphos | ||
| nativent | ||
| nds | ||
| netbsd | ||
| netware | ||
| netwlibc | ||
| objpas | ||
| openbsd | ||
| os2 | ||
| palmos | ||
| powerpc | ||
| powerpc64 | ||
| qnx | ||
| solaris | ||
| sparc | ||
| symbian | ||
| ucmaps | ||
| unix | ||
| watcom | ||
| wii | ||
| win | ||
| win32 | ||
| win64 | ||
| wince | ||
| x86_64 | ||
| COPYING.FPC | ||
| COPYING.txt | ||
| fpmake.inc | ||
| fpmake.pp | ||
| Makefile | ||
| Makefile.fpc | ||
| README.txt | ||
This is the Run-Time Library (RTL) tree for Free Pascal.
To recompile the RTL, edit the main makefile. The makefiles NEED a GNU make
compatible make, they need unix-like 'rm' and 'mv' commands, as well as some
others. You can find these in the gnuutils package on the ftp site.
The main makefile is located ABOVE the RTL tree. It uses the FPC
makefile.fpc to guess reasonable defaults for everything it needs.
(these files can be found in base.zip on the FTP site)
The only variable that you may want to set are
FPC - What compiler to use. Use an absolute path.
(default is ppc386)
INSTALL_UNITDIR - Where to install the RTL units
OPT - any special options you want to set for the compiler.
In principle, you can also descend into the subdirectory of your OS, and
type 'make' there, that should also compile everything.
The tree contains subdirectories for all the supported operating systems,
as well as all processor architectures. The processor directories contain
low-level routines which are required for the system unit (if they are not
available in high-level language form), as well as optimized versions of
the pascal generic routines (the generic routine source code is localed in
the inc subdirectory).
The following directories are not supported officially and may not work
correctly with FreePascal v1.0:
go32v1 - The DJGPP go32v1 DOS extender (no longer supported)
palmos - The PalmOS directory for the Dragonball (incomplete)
Enjoy.