Commit Graph

103 Commits

Author SHA1 Message Date
Pierre Muller
0f0454a092 Modify references to old syslinux unit in comments 2023-09-19 21:53:26 +00:00
florian
5afa26ddd1 * fix compilation for CPUs without thumb
git-svn-id: trunk@48794 -
2021-02-23 20:39:25 +00:00
florian
5e7a512777 * arm-linux: sighnd.inc must check for CPUTHUMB and CPUTHUMB2
git-svn-id: trunk@48670 -
2021-02-13 21:26:15 +00:00
florian
71c314d7d4 * another FPC_VERSION => FPC_FULLVERSIOn fix
* switch back to 32 Bit mode if no thumb code is generated

git-svn-id: trunk@48630 -
2021-02-10 20:46:15 +00:00
florian
3a0eb110ec * FPC_VERSION => FPC_FULLVERSION
git-svn-id: trunk@48547 -
2021-02-08 21:41:04 +00:00
florian
b2a67d4656 * fixed comments in sysnr.inc files
git-svn-id: trunk@47426 -
2020-11-15 19:30:19 +00:00
Károly Balogh
afe8a7596a arm-linux: enable epoll_pwait syscall number. this fixes the ARM Linux build after r44666
git-svn-id: trunk@44675 -
2020-04-10 09:26:00 +00:00
marco
3053f8c2e8 * many syscallh header files had GPL license instead of modified. I owned the copyright, or in one case, Thomas did, but it was a full copy of mine. -> changed to modified
* removed the remark about calling convention from several implementations. Oldfpccall no longer used.

git-svn-id: trunk@43962 -
2020-01-17 12:07:50 +00:00
florian
295041e523 * updated linux syscall numbers
git-svn-id: trunk@43835 -
2020-01-02 11:08:40 +00:00
florian
c189af0e3d * improved software floating point exception handling in the rtl
git-svn-id: trunk@43163 -
2019-10-10 20:31:31 +00:00
florian
245b58c249 + support for arm attributes
* abi notes fixed

git-svn-id: trunk@43157 -
2019-10-09 17:45:40 +00:00
pierre
8e5e877417 Fix compilation with release 3.0.4 ppcarm
git-svn-id: trunk@42175 -
2019-06-05 12:00:53 +00:00
Jonas Maebe
dc681a75ec * properly return from the signal handler on ARM/Linux instead of calling
HandleErrorAddrFrame directly (fixes psabieh exception handling, and
    generally is cleaner)

git-svn-id: trunk@42166 -
2019-06-02 18:33:01 +00:00
florian
eeadf618b8 + abi tag for i386
* arm abi tag moved into pascal file

git-svn-id: trunk@40454 -
2018-12-02 22:56:12 +00:00
pierre
04debba9de Fix arm-android compilation by prepending syscall_nr_ prefix also to __ARM_NR_XXX arm specific linux syscalls
git-svn-id: trunk@40300 -
2018-11-13 11:11:49 +00:00
florian
e949276d9d * basic implementation for pure pascal programs to allocate tls space
git-svn-id: trunk@40268 -
2018-11-07 22:02:59 +00:00
marco
bffbff73e1 * remove deprecated parts linux stat records (FPC 1.0 leftovers)
git-svn-id: trunk@39644 -
2018-08-19 15:10:22 +00:00
Károly Balogh
a3a7285df4 linux: an attempt to clean up and fix syscall calling conventions for ftruncate64, pread64 and pwrite64 on platforms which use aligned register pairs to pass the 64bit parameters
git-svn-id: trunk@37719 -
2017-12-12 02:39:45 +00:00
Károly Balogh
ee37c507d0 tabs to spaces. no functional changes
git-svn-id: trunk@37717 -
2017-12-12 02:03:34 +00:00
Jonas Maebe
e5a1231931 * updated FSF address (mantis #30198, patch by Paul Gevers)
git-svn-id: trunk@34598 -
2016-10-02 12:56:59 +00:00
Károly Balogh
6381280ebd arm-linux: new gprt0 based on cprt0, plus gmon initialization, so profiling output generation actually works now
git-svn-id: trunk@28663 -
2014-09-14 17:07:35 +00:00
florian
7df123aa1e * insert it statements for arm thumb2 in syscall assembler procedures
git-svn-id: trunk@25342 -
2013-08-23 15:22:38 +00:00
Jonas Maebe
81597bf171 * updated address of FSF (mantis #24646, patch by Alexey Svistunov)
git-svn-id: trunk@24986 -
2013-06-27 14:01:18 +00:00
florian
308fb42f4b * fix parameter handling in FPC_SYSCALL4 to FPC_SYSCALL6
git-svn-id: trunk@24193 -
2013-04-07 21:01:01 +00:00
florian
a86531c225 * load exit code in _haltproc for thumb
git-svn-id: trunk@24191 -
2013-04-07 21:00:54 +00:00
florian
a433d53117 + linux syscalls for arm thumb
git-svn-id: trunk@23987 -
2013-03-24 21:39:34 +00:00
florian
9dc03c809e + in_edsp_test is only available if FPC_SYSTEM_FPC_MOVE is defined
git-svn-id: trunk@23985 -
2013-03-24 20:25:42 +00:00
florian
767e932e0e + arm-linux startup code for thumb
git-svn-id: trunk@23981 -
2013-03-24 20:23:00 +00:00
masta
109eb8bf75 Add a couple of ARM Linux syscalls
This adds the following syscalls from Linux 3.5.0:

syscall_nr_preadv
syscall_nr_pwritev
syscall_nr_rt_tgsigqueueinfo
syscall_nr_perf_event_open
syscall_nr_recvmmsg

git-svn-id: trunk@21951 -
2012-07-22 22:58:16 +00:00
tom_at_work
9ce34c63c9 Fix shared library loading and unloading for Linux platforms. Shared library initialization and finalization are now called correctly at program startup for compile-time linked dynamic libraries on powerpc-/powerpc64-/arm-/i386- and x86_64-linux.
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 -
2011-09-08 21:17:35 +00:00
florian
00768bea47 * fix compilation of dllprt0.as for older arm assemblers without push support
git-svn-id: trunk@17254 -
2011-04-05 19:42:36 +00:00
tom_at_work
b0bd6a13ec Fixed argc/argv/envp for arm/linux shared libraries. They are by default in registers a1/a2/a3 as per ABI: the first arguments when calling a method (in this case the FPC_SHARED_LIB_START) are passed via registers, not on the stack.
git-svn-id: trunk@17033 -
2011-02-27 17:22:29 +00:00
tom_at_work
a8bf34d3fc Correctly return to caller in ARM/Linux shared library startup code instead of fall-through to system exit.
git-svn-id: trunk@16982 -
2011-02-23 09:41:19 +00:00
tom_at_work
56d30e7da0 Set up environment variables and call Pascal initialization in arm/linux shared library initialization
git-svn-id: trunk@16981 -
2011-02-22 22:32:44 +00:00
daniel
3307d98c40 - Revert micro-exe mode for now.
git-svn-id: trunk@16170 -
2010-10-15 16:49:48 +00:00
daniel
2139a229d3 + If no unit is used, no symbol inside the system unit is used,
and no language features requiring initialization are used,
    do not initialize units, but just configure the fpu and
    signal handlers.

git-svn-id: trunk@16124 -
2010-10-10 17:40:39 +00:00
daniel
f4ec65add8 - Remove unused variable fpustate.
git-svn-id: trunk@16123 -
2010-10-10 15:09:05 +00:00
Jonas Maebe
eda7a8d672 * replaced the "quick exit" instruction sequences from the syscall variants
lacking "nostackframe" with branches to an exit label, because in that
    case the compiler-generated exit code must be executed to balance the
    stack (only done for EABI; should probably also be done for OABI, but
    I can't test that)

git-svn-id: trunk@16073 -
2010-10-01 15:06:57 +00:00
florian
3668be7ee4 * minimal implementation by Benjamin 'BeRo' Rosseaux
git-svn-id: trunk@15484 -
2010-06-27 11:07:35 +00:00
florian
5692c9e787 * tabs by spaces replaced
git-svn-id: trunk@15483 -
2010-06-27 11:04:27 +00:00
michael
e8a375c774 * Patch from Henry Vermaak to fix EABI kernel API for arm.
git-svn-id: trunk@13563 -
2009-08-20 08:00:50 +00:00
Jonas Maebe
f6d452c2c0 * remove the RTL's installed signal handlers at the end of the system
unit's initialization code in case we're in a library
  + implemented InquireSignal(), AbandonSignalHandler(), HookSignal() and
    UnhookSignal() in the sysutils unit
  * for Kylix compatibility, these routines support operating on
    SIGINT and SIGQUIT as well, although they are not hooked by default
    by FPC. The run time errors/exception codes for these signals are
    resp. 217 and 233 (same as in Kylix; I changed ENoWideStringSupport
    to 234).
  * changed the BSD syscall version of fpsigaction to use pointer
    rather than "var" arguments (compatible with other targets, and
    required to be able to pass nil arguments inside the system unit)
  -> together fixes mantis #12704

git-svn-id: trunk@13077 -
2009-05-02 09:40:44 +00:00
florian
4bc28de96f * use different haltproc for arm-linux-eabi, this should be cleaned up by using also pascal units for the startup code for arm-linux
git-svn-id: trunk@12808 -
2009-02-27 15:20:20 +00:00
Jonas Maebe
3216e8c7bc * mark produced object files as "does not require executable stack" by
default for Linux (overridable using -WX switch) (mantis #11563)

git-svn-id: trunk@12356 -
2008-12-12 16:26:25 +00:00
micha
04d8ad3f17 * fix linux syscall numbers naming consistency #2 (overlooked some)
git-svn-id: trunk@12154 -
2008-11-17 21:48:02 +00:00
micha
176f545c3b * fix linux syscall numbers naming consistency (fixes x86_64 unit linux build)
git-svn-id: trunk@12153 -
2008-11-17 21:46:34 +00:00
florian
10e0f0e387 * keep stack aligned at 8 byte boundary inside the startup code
git-svn-id: trunk@11934 -
2008-10-18 21:20:54 +00:00
florian
2cbdf2cd61 + arm linux syscalls updated
git-svn-id: trunk@11930 -
2008-10-18 18:57:20 +00:00
florian
037f95c451 * fixed syscall0 for arm eabi
git-svn-id: trunk@11914 -
2008-10-18 13:49:39 +00:00
florian
3b5699e488 * removed packed, the stat record should be c packed
* deprecated old fields as it is done on other architectures

git-svn-id: trunk@11912 -
2008-10-18 13:48:17 +00:00