+ abi tag for i386

* arm abi tag moved into pascal file

git-svn-id: trunk@40454 -
This commit is contained in:
florian 2018-12-02 22:56:12 +00:00
parent 6629e72d79
commit eeadf618b8
9 changed files with 74 additions and 62 deletions

2
.gitattributes vendored
View File

@ -9607,6 +9607,7 @@ rtl/linux/aarch64/stat.inc svneol=native#text/plain
rtl/linux/aarch64/syscall.inc svneol=native#text/plain
rtl/linux/aarch64/syscallh.inc svneol=native#text/plain
rtl/linux/aarch64/sysnr.inc svneol=native#text/plain
rtl/linux/arm/abitag.inc svneol=native#text/plain
rtl/linux/arm/bsyscall.inc svneol=native#text/plain
rtl/linux/arm/cprt0.as svneol=native#text/plain
rtl/linux/arm/dllprt0.as svneol=native#text/plain
@ -9628,6 +9629,7 @@ rtl/linux/errno.inc svneol=native#text/plain
rtl/linux/errnostr.inc svneol=native#text/plain
rtl/linux/fpcylix.pp svneol=native#text/plain
rtl/linux/fpmake.inc svneol=native#text/plain
rtl/linux/i386/abitag.inc svneol=native#text/plain
rtl/linux/i386/bsyscall.inc svneol=native#text/plain
rtl/linux/i386/si_c.inc svneol=native#text/plain
rtl/linux/i386/si_c21.inc svneol=native#text/plain

View File

@ -1340,9 +1340,9 @@ unit raatt;
if actasmtoken=AS_COMMA then
begin
Consume(AS_COMMA);
if actasmtoken=AS_MOD then
if (actasmtoken=AS_MOD) or (actasmtoken=AS_AT) then
begin
Consume(AS_MOD);
Consume(actasmtoken);
if actasmtoken=AS_ID then
begin
case actasmpattern of

32
rtl/linux/arm/abitag.inc Normal file
View File

@ -0,0 +1,32 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 2002,2018 by Florian Klaempfl
members of the Free Pascal development team.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY;without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
procedure ABITag;nostackframe;assembler;
asm
.section ".note.ABI-tag", "a"
.align 4
.long 4
.long 16
.long 1
.asciz "GNU"
.align 4
.long 0
// oldest supported kernel version, just a guess for now (FK)
.long 2,6,0
.align 4
.section ".note.GNU-stack","",@progbits
.text
end;

View File

@ -131,18 +131,3 @@ __data_start:
.byte 0
.ascii "generated by FPC http://www.freepascal.org\0"
/* We need this stuff to make gdb behave itself, otherwise
gdb will chokes with SIGILL when trying to debug apps.
*/
.section ".note.ABI-tag", "a"
.align 4
.long 1f - 0f
.long 3f - 2f
.long 1
0: .asciz "GNU"
1: .align 4
2: .long 0
.long 2,0,0
3: .align 4
.section .note.GNU-stack,"",%progbits

View File

@ -143,18 +143,3 @@ __data_start:
.byte 0
.ascii "generated by FPC http://www.freepascal.org\0"
/* We need this stuff to make gdb behave itself, otherwise
gdb will chokes with SIGILL when trying to debug apps.
*/
.section ".note.ABI-tag", "a"
.align 4
.long 1f - 0f
.long 3f - 2f
.long 1
0: .asciz "GNU"
1: .align 4
2: .long 0
.long 2,0,0
3: .align 4
.section .note.GNU-stack,"",%progbits

View File

@ -173,18 +173,3 @@ __data_start:
.byte 0
.ascii "generated by FPC http://www.freepascal.org\0"
/* We need this stuff to make gdb behave itself, otherwise
gdb will chokes with SIGILL when trying to debug apps.
*/
.section ".note.ABI-tag", "a"
.align 4
.long 1f - 0f
.long 3f - 2f
.long 1
0: .asciz "GNU"
1: .align 4
2: .long 0
.long 2,0,0
3: .align 4
.section .note.GNU-stack,"",%progbits

View File

@ -168,18 +168,3 @@ __data_start:
.comm operatingsystem_parameter_argc,4
.comm operatingsystem_parameter_argv,4
/* We need this stuff to make gdb behave itself, otherwise
gdb will chokes with SIGILL when trying to debug apps.
*/
.section ".note.ABI-tag", "a"
.align 4
.long 1f - 0f
.long 3f - 2f
.long 1
0: .asciz "GNU"
1: .align 4
2: .long 0
.long 2,0,0
3: .align 4
.section .note.GNU-stack,"",%progbits

32
rtl/linux/i386/abitag.inc Normal file
View File

@ -0,0 +1,32 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 2002,2018 by Florian Klaempfl
members of the Free Pascal development team.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY;without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
procedure ABITag;nostackframe;assembler;
asm
.section ".note.ABI-tag", "a"
.align 4
.long 4
.long 16
.long 1
.asciz "GNU"
.align 4
.long 0
// oldest supported kernel version, just a guess for now (FK)
.long 2,6,0
.align 4
.section ".note.GNU-stack","",@progbits
.text
end;

View File

@ -575,6 +575,12 @@ procedure InitTLS; [public,alias:'FPC_INITTLS'];
{$endif CPUARM}
{$if FPC_FULLVERSION>30200}
{$if defined(CPUI386) or defined(CPUARM)}
{$I abitag.inc}
{$endif defined(CPUI386) or defined(CPUARM)}
{$endif FPC_FULLVERSION>30200}
begin
{$if defined(i386) and not defined(FPC_USE_LIBC)}
InitSyscallIntf;