Commit Graph

90 Commits

Author SHA1 Message Date
Pierre Muller
ab184895cc Fix compilation of sparc-linux rtl with -dFPC_USE_LIBC
(cherry picked from commit 1433c4f2f8)
2022-07-12 20:32:41 +00:00
florian
4995677b0f --- Zusammenführung
-- Zusammenführen von r45995 in ».«:
U    rtl/linux/i386/sighnd.inc
U    rtl/linux/x86_64/sighnd.inc
A    tests/webtbs/tw37468.pp
-- Aufzeichnung der Informationen für Zusammenführung von r45995 in ».«:
 U   .
-- Zusammenführen von r46207 in ».«:
U    rtl/linux/i386/sighndh.inc
-- Aufzeichnung der Informationen für Zusammenführung von r46207 in ».«:
 G   .
-- Zusammenführen von r46208 in ».«:
G    rtl/linux/i386/sighnd.inc
-- Aufzeichnung der Informationen für Zusammenführung von r46208 in ».«:
 G   .
-- Zusammenführen von r46210 in ».«:
U    rtl/aix/sighnd.inc
U    rtl/beos/i386/sighnd.inc
U    rtl/go32v2/dpmiexcp.pp
U    rtl/haiku/i386/sighnd.inc
U    rtl/haiku/x86_64/sighnd.inc
U    rtl/i8086/math.inc
U    rtl/inc/genmath.inc
U    rtl/linux/m68k/sighnd.inc
U    rtl/linux/powerpc/sighnd.inc
U    rtl/linux/powerpc64/sighnd.inc
U    rtl/linux/sparc/sighnd.inc
U    rtl/linux/sparc64/sighnd.inc
G    rtl/linux/x86_64/sighnd.inc
U    rtl/netbsd/arm/sighnd.inc
U    rtl/netbsd/m68k/sighnd.inc
U    rtl/netbsd/powerpc/sighnd.inc
U    rtl/netbsd/x86_64/sighnd.inc
U    rtl/openbsd/i386/sighnd.inc
U    rtl/openbsd/x86_64/sighnd.inc
U    rtl/os2/system.pas
U    rtl/solaris/i386/sighnd.inc
U    rtl/solaris/sparc/sighnd.inc
U    rtl/solaris/x86_64/sighnd.inc
U    rtl/win32/system.pp
U    rtl/win64/system.pp
U    tests/webtbs/tw37468.pp
U    rtl/wince/system.pp
-- Aufzeichnung der Informationen für Zusammenführung von r46210 in ».«:
 G   .
-- Zusammenführen von r46992 in ».«:
G    rtl/linux/x86_64/sighnd.inc
A    tests/webtbs/tw37468b.pp
-- Aufzeichnung der Informationen für Zusammenführung von r46992 in ».«:
 G   .
-- Zusammenführen von r47114 in ».«:
G    rtl/linux/x86_64/sighnd.inc
G    rtl/linux/i386/sighnd.inc
A    tests/webtbs/tw37926.pp
-- Aufzeichnung der Informationen für Zusammenführung von r47114 in ».«:
 G   .
-- Zusammenführen von r47117 in ».«:
G    rtl/linux/i386/sighnd.inc
G    rtl/linux/x86_64/sighnd.inc
G    rtl/linux/m68k/sighnd.inc
-- Aufzeichnung der Informationen für Zusammenführung von r47117 in ».«:
 G   .

git-svn-id: branches/fixes_3_2@47906 -
2020-12-30 14:07:17 +00:00
pierre
27960785a6 Merge commit 45836
------------------------------------------------------------------------
r45836 | pierre | 2020-07-23 20:59:03 +0000 (Thu, 23 Jul 2020) | 1 line

 Fix error in assembly startup code for sparc linux
------------------------------------------------------------------------
--- Merging r45836 into '.':
U    rtl/linux/sparc/prt0.as
--- Recording mergeinfo for merge of r45836 into '.':
 U   .

git-svn-id: branches/fixes_3_2@45851 -
2020-07-25 12:44:49 +00:00
marco
897ae85a0e revs 43962,43963,43964,43965,43969
* license clarifications. Accidental GPL removed. Introduced by me during
    *nix reform in a few .incs and those templates got copied around (os* sysc*)
  * clarify OS2/EMX license to actually name the license rather than 
    saying "NOT GPL" and refering to EMX.

git-svn-id: branches/fixes_3_2@43970 -
2020-01-18 12:32:05 +00:00
florian
96f28cbb11 * move sysnr.inc to a rtl/linux/sparcgen dir
* adapt makefiles to reflect this

git-svn-id: trunk@36411 -
2017-06-03 20:52:41 +00:00
sergei
1643c175f2 + .so startup code for sparc-linux.
git-svn-id: trunk@27412 -
2014-03-31 15:45:16 +00:00
sergei
62a5ba14a3 + SPARC: support finalization routine supplied by dynamic linker.
+ Added "stack not executable" marker.

git-svn-id: trunk@26287 -
2013-12-26 09:09:23 +00:00
sergei
16156cbcd7 - SPARC RTL: removed assembler PIC/threadvar hacks.
git-svn-id: trunk@26260 -
2013-12-22 13:42:53 +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
pierre
bba4932ef9 * Fix commit 23220, by moving declaration from syscallh.inc to syscall.inc
git-svn-id: trunk@23221 -
2012-12-25 22:54:49 +00:00
pierre
70a29668a4 Try to fix simply the fpc_threadvar_relocate_proc problem
git-svn-id: trunk@23220 -
2012-12-24 16:23:30 +00:00
pierre
4295cc417e Fix PIC instruction for syscalls
git-svn-id: trunk@22497 -
2012-09-28 14:47:54 +00:00
pierre
d95ff52463 Add PIC code
git-svn-id: trunk@22496 -
2012-09-28 13:52:02 +00:00
pierre
20c9d19764 Add PIC specific code
git-svn-id: trunk@22484 -
2012-09-27 15:50:31 +00:00
pierre
62356c0e17 + add support for unlimited PIC mode
git-svn-id: trunk@22483 -
2012-09-27 15:50:02 +00:00
pierre
abef064786 Adapt TSigContext to structure found by debugging
git-svn-id: trunk@22482 -
2012-09-27 15:49:13 +00:00
pierre
5deddaec8c Adapt TSigContext to structure found by debugging
git-svn-id: trunk@22481 -
2012-09-27 15:48:54 +00:00
pierre
645698183d Integer Overflow signal must be mapped to error 215, not 205, which is for floating point overflow
git-svn-id: trunk@21807 -
2012-07-06 15:54:45 +00:00
pierre
94c8a75efd syscall 280 is __NR_tee for sparc CPU
git-svn-id: trunk@20922 -
2012-04-18 15:54:34 +00:00
florian
c7f846ebd5 + added missing syscalls so sparc-linux rtl compiles again
git-svn-id: trunk@19790 -
2011-12-09 20:35:11 +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
ivost
d4cde5eaa2 * added syscall_nr_futex = 142 for sparc architecture
git-svn-id: trunk@16994 -
2011-02-24 10:51:54 +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
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
micha
341cec908d * update linux syscall numbers (merge powerpc64 to powerpc)
git-svn-id: trunk@12106 -
2008-11-15 15:42:12 +00:00
marco
a123ec0d14 * More deprecated.
git-svn-id: trunk@7566 -
2007-06-03 18:55:36 +00:00
Jonas Maebe
cb23a80178 * fixed fpu rte code for invalid, inexact and "subscript out of range"
errors (216 -> 207) (same as for sparc/solaris in r7453)

git-svn-id: trunk@7477 -
2007-05-25 19:22:28 +00:00
Jonas Maebe
a2dbc4d272 * fixed multi-thread case of FPC_SYSCALL3 (all others were already correct)
git-svn-id: trunk@7476 -
2007-05-25 19:02:19 +00:00
Jonas Maebe
f8b40e90dc * exit -> exit_group to exit so unterminated threads are killed too
git-svn-id: trunk@7474 -
2007-05-25 17:48:24 +00:00
Jonas Maebe
cc03eacd2a * fixed program exitcode after change of operatingsystem_result from
word to longint

git-svn-id: trunk@7473 -
2007-05-25 13:07:23 +00:00
Jonas Maebe
b9a97ae891 * another sparc/linux fix for stat (record must NOT be packed, or
variables of that type will not be aligned properly)

git-svn-id: trunk@7460 -
2007-05-24 22:50:33 +00:00
florian
d7da24aae2 * fixed another bloody stat record issue
git-svn-id: trunk@7060 -
2007-04-05 09:38:06 +00:00
daniel
3a7266a462 * Handle FPC_USE_LIBC case for Sparc too.
git-svn-id: trunk@6967 -
2007-03-23 23:30:18 +00:00
daniel
084a78fdd3 * Make sparc/linux stat structure backward compatible too.
git-svn-id: trunk@6966 -
2007-03-23 23:24:12 +00:00
marco
57cfd89fbd * Linux 64-bit FS patch from neli for FPC_USE_LIBC
git-svn-id: trunk@6517 -
2007-02-16 22:16:54 +00:00
micha
b14c83a7e1 * stat records differ too much: use stat include file
git-svn-id: trunk@5126 -
2006-10-31 15:45:22 +00:00
Jonas Maebe
934734df85 + added missing syscalls from Mark Morgan Lloyd
git-svn-id: trunk@4339 -
2006-08-03 16:16:07 +00:00
marco
05bb11b2ba * syscalls regenerated by Neli.
git-svn-id: trunk@2552 -
2006-02-12 21:45:34 +00:00
peter
94f2b1d941 * add initialstkptr to get the stackpointer at startup before
PASCALMAIN is called so the main body framepointer is seen as
    a valid pointer with backtracing

git-svn-id: trunk@2266 -
2006-01-12 09:29:57 +00:00
florian
834ae15bd1 * fixed sparc building
git-svn-id: trunk@2063 -
2005-12-27 10:41:42 +00:00
florian
d4bb99a5fb + runerror 214: bus error/data misaligment
git-svn-id: trunk@1263 -
2005-10-03 08:25:20 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
16b121f8c4 * unblock signal in signalhandler, remove the sigprocmask call
from setjmp
2005-04-24 21:19:22 +00:00
florian
c5be640fb6 * final fppipe fix hopefully 2005-03-03 22:02:59 +00:00
florian
314fe14247 + routines in baseunix can be overriden by processor specifics in bsyscall.inc 2005-03-03 20:58:38 +00:00
florian
a6b7be5ca1 + sparc specific pipe implementation 2005-03-03 20:13:44 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00