View Issue Details

IDProjectCategoryView StatusLast Update
0034475FPCCompilerpublic2019-11-03 22:30
ReporterCyrax Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
PlatformLinux x86_64OSArch 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0034475: When exception is raised and its not handled properly, the stack trace doesn't show correct file names and their numbers.
DescriptionThis only happens when FPC trunk r39935 i386-linux is used to build attached test project. When built with FPC trunk r40059 x86_64-linux, it shows correct info.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Relationships

related to 0034430 assignedMartin Friebe Lazarus Assembler window is empty and "Cannot access memory at address <x>". 

Activities

Cyrax

2018-10-29 13:12

reporter  

project1.zip (1,027 bytes)

Cyrax

2018-10-29 13:13

reporter  

output i386 linux.txt (491 bytes)   
An unhandled exception occurred at $08049073:
Exception: test
An unhandled exception occurred at $080721C0:
EAccessViolation: Access violation
  $080721C0
  $08071FF4
  $0806FE47
  $08071B53
  $08071E07
  $080BD2BE
  $0805FDFC
  $0805FEDE
  $08049095
  $080490AD

  $08049073
An unhandled exception occurred at $080721C0:
EAccessViolation: Access violation
  $080721C0
  $08071FF4
  $0806FE47
  $08071B53
  $08071E07
  $080BD321
  $0805FDFC
  $0805FEDE
  $08049095
  $080490AD

  $080490AD

output i386 linux.txt (491 bytes)   

Cyrax

2018-10-29 13:13

reporter  

output x86_64 linux.txt (237 bytes)   
An unhandled exception occurred at $0000000000401094:
Exception: test
  $0000000000401094  GIVEEXCEPTION,  line 13 of project1.lpr
  $00000000004010DE  main,  line 18 of project1.lpr
  $000000000042CF00  SYSENTRY,  line 142 of system.pp
output x86_64 linux.txt (237 bytes)   

Cyrax

2018-10-29 13:15

reporter  

Cyrax

2018-10-29 13:16

reporter  

Cyrax

2018-10-29 13:24

reporter   ~0111652

No change, if I use FPC trunk r40059 i386-linux to build the test project.

Cyrax

2018-10-29 13:27

reporter  

Cyrax

2018-10-29 13:29

reporter  

Cyrax

2018-10-29 13:44

reporter   ~0111655

When built for i386-Windows, stack trace is correctly displayed. Same for x86_64-windows.

Cyrax

2018-11-04 03:25

reporter   ~0111770

(gdb) info files
Symbols from "/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/serious 02/fpc stack trace test 01/bin/i386-linux-Default-30301/project1".
Local exec file:
    `/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/serious 02/fpc stack trace test 01/bin/i386-linux-Default-30301/project1', file type elf32-i386.
    Entry point: 0x8049000
    0x08049000 - 0x080d2ed0 is .text
    0x080d3000 - 0x080e3808 is .rodata
    0x080e4000 - 0x081015c0 is .data
    0x081016a0 - 0x08105ab4 is .bss
(gdb) run
Starting program: /mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/serious 02/fpc stack trace test 01/bin/i386-linux-Default-30301/project1 
An unhandled exception occurred at $08049073:
Exception: test

Program received signal SIGSEGV, Segmentation fault.
0x08072270 in GETEXEINMEMORYBASEADDR (ADDR=0x8049073, BASEADDR=0x0, FILENAME=..., highFILENAME=255) at ../inc/exeinfo.pp:912
912	            if (phdr^.p_type = 1 {PT_LOAD}) and (ptruint(phdr^.p_vaddr) < found_addr) then
(gdb) bt
#0  0x08072270 in GETEXEINMEMORYBASEADDR (ADDR=0x8049073, BASEADDR=0x0, FILENAME=..., highFILENAME=255) at ../inc/exeinfo.pp:912
0000001  0x080720a4 in GETMODULEBYADDR (ADDR=0x8049073, BASEADDR=0x0, FILENAME=...) at ../inc/exeinfo.pp:75
0000002  0x0806fef7 in OPENDWARF (ADDR=0x8049073) at ../inc/lnfodwrf.pp:278
0000003  0x08071c03 in GETLINEINFO (ADDR=134516851, FUNC=..., SOURCE=..., LINE=0) at ../inc/lnfodwrf.pp:1301
0000004  0x08071eb7 in DWARFBACKTRACESTR (ADDR=0x8049073) at ../inc/lnfodwrf.pp:1386
0000005  0x080bd36e in CATCHUNHANDLEDEXCEPTION (OBJ=0xf7ff1050, ADDR=0x8049073, FRAMECOUNT=1, FRAMES=0xf7fc9020) at ../objpas/sysutils/sysutils.inc:321
0000006  0x0805fe3c in DOUNHANDLEDEXCEPTION () at ../inc/except.inc:144
0000007  0x0805ff1e in fpc_raiseexception (OBJ=0xf7ff1050, ANADDR=0x8049073, AFRAME=0xffffda80) at ../inc/except.inc:171
0000008  0x08049095 in GIVEEXCEPTION () at project1.lpr:38
0000009  0x080490ad in main () at project1.lpr:46
(gdb) 


(gdb) info files
Symbols from "/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/serious 02/fpc stack trace test 01/bin/i386-linux-Default-30301/project1".
Local exec file:
    `/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/serious 02/fpc stack trace test 01/bin/i386-linux-Default-30301/project1', file type elf32-i386.
    Entry point: 0x80490c0
    0x08048114 - 0x08048130 is .note.gnu.property
    0x08049000 - 0x080d2f90 is .text
    0x080d3000 - 0x080e3808 is .rodata
    0x080e3808 - 0x080e380c is .eh_frame
    0x080e4ff8 - 0x080e4ffc is .init_array
    0x080e4ffc - 0x080e5000 is .fini_array
    0x080e5000 - 0x081025c0 is .data
    0x081026a0 - 0x08106ac4 is .bss
(gdb) run
Starting program: /mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/serious 02/fpc stack trace test 01/bin/i386-linux-Default-30301/project1 
An unhandled exception occurred at $08049133:
Exception: test
  $08049133  GIVEEXCEPTION,  line 37 of project1.lpr
  $0804916D  main,  line 46 of project1.lpr

[Inferior 1 (process 25124) exited with code 0331]


Looks like that adding crtbegin.o and crtend.o object files into linker resource file and then running linker script to link and create the binary file will bring correct output to stack trace. And does not crash at location ../inc/exeinfo.pp:912.

Cyrax

2018-11-04 03:26

reporter   ~0111771

Using i386 FPC 3.3.1 r40202.

Cyrax

2018-11-04 03:59

reporter   ~0111772

(gdb) info files
Symbols from "/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/serious 02/fpc stack trace test 01/bin/x86_64-linux-Default-30301/project1".
Local exec file:
    `/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/serious 02/fpc stack trace test 01/bin/x86_64-linux-Default-30301/project1', file type elf64-x86-64.
    Entry point: 0x401000
    0x0000000000400190 - 0x00000000004001b0 is .note.ABI-tag
    0x0000000000401000 - 0x00000000004a87c0 is .text
    0x00000000004a9000 - 0x00000000004beb48 is .rodata
    0x00000000004bfb50 - 0x00000000004ee4d0 is .data
    0x00000000004ee660 - 0x00000000004f2f48 is .bss
(gdb) run
Starting program: /mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/serious 02/fpc stack trace test 01/bin/x86_64-linux-Default-30301/project1 
An unhandled exception occurred at $0000000000401094:
Exception: test
  $0000000000401094  GIVEEXCEPTION,  line 37 of project1.lpr
  $00000000004010DE  main,  line 46 of project1.lpr
  $000000000042CF90  SYSENTRY,  line 142 of system.pp

[Inferior 1 (process 32688) exited with code 0331]

Cyrax

2018-11-04 04:33

reporter   ~0111773

Brief testing shows that i386-linux target should get its own .note.ABI-tag section like x86_64-linux does have.

Cyrax

2018-11-11 04:59

reporter   ~0111898

Last edited: 2018-11-11 05:04

View 2 revisions

Test project built with FPC 3.3.1 r40279 i386 now gives "Segmentation fault (core dumped)".

---
GDB gives this output when debugging it :
(gdb) info files
Symbols from "/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/research 02/source 05/fpc library test 01/bin/i386-linux-Default1-30301/project1".
Local exec file:
    `/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/research 02/source 05/fpc library test 01/bin/i386-linux-Default1-30301/project1', file type elf32-i386.
    Entry point: 0x8049000
    0x08049000 - 0x080d3120 is .text
    0x080d4000 - 0x080e4820 is .rodata
    0x080e5000 - 0x081025c0 is .data
    0x081026a0 - 0x08106ab4 is .bss
(gdb) run
Starting program: /mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/research 02/source 05/fpc library test 01/bin/i386-linux-Default1-30301/project1 

Program received signal SIGSEGV, Segmentation fault.
0x0806ff4b in INITTLS () at system.pp:541
541	        if phdr^.p_type=PT_TLS then
(gdb) bt
#0  0x0806ff4b in INITTLS () at system.pp:541
0000001  0x0804902b in _FPC_PROC_START () at i386/si_prc.inc:100
(gdb) info files
Symbols from "/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/research 02/source 05/fpc library test 01/bin/i386-linux-Default1-30301/project1".
Native process:
    Using the running image of child process 3567.
    While running this, GDB does not access memory from...
Local exec file:
    `/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/research 02/source 05/fpc library test 01/bin/i386-linux-Default1-30301/project1', file type elf32-i386.
    Entry point: 0x8049000
    0x08049000 - 0x080d3120 is .text
    0x080d4000 - 0x080e4820 is .rodata
    0x080e5000 - 0x081025c0 is .data
    0x081026a0 - 0x08106ab4 is .bss
    0xf7ffc0b4 - 0xf7ffc0ec is .hash in system-supplied DSO at 0xf7ffc000
    0xf7ffc0ec - 0xf7ffc130 is .gnu.hash in system-supplied DSO at 0xf7ffc000
    0xf7ffc130 - 0xf7ffc1c0 is .dynsym in system-supplied DSO at 0xf7ffc000
    0xf7ffc1c0 - 0xf7ffc255 is .dynstr in system-supplied DSO at 0xf7ffc000
    0xf7ffc256 - 0xf7ffc268 is .gnu.version in system-supplied DSO at 0xf7ffc000
    0xf7ffc268 - 0xf7ffc2bc is .gnu.version_d in system-supplied DSO at 0xf7ffc000
    0xf7ffc2bc - 0xf7ffc344 is .dynamic in system-supplied DSO at 0xf7ffc000
    0xf7ffc344 - 0xf7ffc558 is .rodata in system-supplied DSO at 0xf7ffc000
    0xf7ffc558 - 0xf7ffc5d0 is .note in system-supplied DSO at 0xf7ffc000
    0xf7ffc5d0 - 0xf7ffc6dc is .eh_frame in system-supplied DSO at 0xf7ffc000
    0xf7ffc6e0 - 0xf7ffd088 is .text in system-supplied DSO at 0xf7ffc000
    0xf7ffd088 - 0xf7ffd124 is .altinstructions in system-supplied DSO at 0xf7ffc000
    0xf7ffd124 - 0xf7ffd14a is .altinstr_replacement in system-supplied DSO at 0xf7ffc000
(gdb)


Cyrax

2018-11-27 15:39

reporter   ~0112232

Free Pascal Compiler version 3.3.1-r40378 [2018/11/27] for i386


GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./project1...done.
(gdb) info files
Symbols from "/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/research bugs/fpc/bugs 10/fpc linux abi stack trace bug 00/bin/i386-linux-30301/project1".
Local exec file:
    `/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/research bugs/fpc/bugs 10/fpc linux abi stack trace bug 00/bin/i386-linux-30301/project1', file type elf32-i386.
    Entry point: 0x8049000
    0x08049000 - 0x080d8360 is .text
    0x080d9000 - 0x080e9808 is .rodata
    0x080ea000 - 0x081075b0 is .data
    0x08107690 - 0x0810baa4 is .bss
(gdb) run
Starting program: /mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/research bugs/fpc/bugs 10/fpc linux abi stack trace bug 00/bin/i386-linux-30301/project1 

Program received signal SIGSEGV, Segmentation fault.
0x080718df in INITTLS () at system.pp:543
543	        case phdr^.p_type of
(gdb) bt
#0  0x080718df in INITTLS () at system.pp:543
0000001  0x0804902b in _FPC_PROC_START () at i386/si_prc.inc:107
(gdb) info files
Symbols from "/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/research bugs/fpc/bugs 10/fpc linux abi stack trace bug 00/bin/i386-linux-30301/project1".
Native process:
    Using the running image of child process 30505.
    While running this, GDB does not access memory from...
Local exec file:
    `/mnt/shares/ohjelmointi/32-bit/kielet/pascal/free_pascal/lazarus/projects/research bugs/fpc/bugs 10/fpc linux abi stack trace bug 00/bin/i386-linux-30301/project1', file type elf32-i386.
    Entry point: 0x8049000
    0x08049000 - 0x080d8360 is .text
    0x080d9000 - 0x080e9808 is .rodata
    0x080ea000 - 0x081075b0 is .data
    0x08107690 - 0x0810baa4 is .bss
    0xf7ffc0b4 - 0xf7ffc0ec is .hash in system-supplied DSO at 0xf7ffc000
    0xf7ffc0ec - 0xf7ffc130 is .gnu.hash in system-supplied DSO at 0xf7ffc000
    0xf7ffc130 - 0xf7ffc1c0 is .dynsym in system-supplied DSO at 0xf7ffc000
    0xf7ffc1c0 - 0xf7ffc255 is .dynstr in system-supplied DSO at 0xf7ffc000
    0xf7ffc256 - 0xf7ffc268 is .gnu.version in system-supplied DSO at 0xf7ffc000
    0xf7ffc268 - 0xf7ffc2bc is .gnu.version_d in system-supplied DSO at 0xf7ffc000
    0xf7ffc2bc - 0xf7ffc344 is .dynamic in system-supplied DSO at 0xf7ffc000
    0xf7ffc344 - 0xf7ffc558 is .rodata in system-supplied DSO at 0xf7ffc000
    0xf7ffc558 - 0xf7ffc5d0 is .note in system-supplied DSO at 0xf7ffc000
    0xf7ffc5d0 - 0xf7ffc6dc is .eh_frame in system-supplied DSO at 0xf7ffc000
    0xf7ffc6e0 - 0xf7ffce08 is .text in system-supplied DSO at 0xf7ffc000
    0xf7ffce08 - 0xf7ffce70 is .altinstructions in system-supplied DSO at 0xf7ffc000
    0xf7ffce70 - 0xf7ffce8a is .altinstr_replacement in system-supplied DSO at 0xf7ffc000
(gdb)

Cyrax

2018-11-27 15:48

reporter  

loader-abitag.diff (5,180 bytes)   
diff --git rtl/linux/Makefile rtl/linux/Makefile
index 64e6793385..95542d4145 100644
--- rtl/linux/Makefile
+++ rtl/linux/Makefile
@@ -342,7 +342,7 @@ CPU_UNITS=
 SYSINIT_UNITS=
 LOADERS=prt0 dllprt0 cprt0 gprt0
 ifeq ($(ARCH),i386)
-override LOADERS=
+override LOADERS=abitag
 CPU_UNITS=x86 ports cpu mmx
 SYSINIT_UNITS=si_prc si_c21g si_c21 si_c si_dll si_uc
 endif
diff --git rtl/linux/Makefile.fpc rtl/linux/Makefile.fpc
index 835bd8018a..521f7d2812 100644
--- rtl/linux/Makefile.fpc
+++ rtl/linux/Makefile.fpc
@@ -70,7 +70,7 @@ SYSINIT_UNITS=
 LOADERS=prt0 dllprt0 cprt0 gprt0
 
 ifeq ($(ARCH),i386)
-override LOADERS=
+override LOADERS=abitag
 CPU_UNITS=x86 ports cpu mmx
 SYSINIT_UNITS=si_prc si_c21g si_c21 si_c si_dll si_uc
 endif
diff --git rtl/linux/fpmake.inc rtl/linux/fpmake.inc
index db0077dfc3..493086e421 100644
--- rtl/linux/fpmake.inc
+++ rtl/linux/fpmake.inc
@@ -36,4 +36,8 @@ begin
     AddLoader('cprt21');
     AddLoader('gprt21');
     end;
-end;    
\ No newline at end of file
+  If (Defaults.CPU in [i386,x86_64]) Then
+    begin
+    AddLoader('abitag');
+    end;
+end;    
diff --git rtl/linux/i386/abitag.as rtl/linux/i386/abitag.as
new file mode 100644
index 0000000000..9098ca771b
--- /dev/null
+++ rtl/linux/i386/abitag.as
@@ -0,0 +1,29 @@
+#
+#   This file is part of the Free Pascal run time library.
+#   Copyright (c) 2002 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.
+#
+#**********************************************************************
+
+.file "abitag.as"
+
+        .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,4,0
+3:      .align 4
+
+	.section .note.GNU-stack,"",@progbits
+
diff --git rtl/linux/i386/si_c.inc rtl/linux/i386/si_c.inc
index 815c1c430d..09c313e17c 100644
--- rtl/linux/i386/si_c.inc
+++ rtl/linux/i386/si_c.inc
@@ -33,6 +33,9 @@
          argc <--- esp
 }
 
+{$asmmode ATT}
+
+{$L abitag.o}
 var
   libc_environ: pchar; external name '__environ';
   libc_fpu_control: word; external name '__fpu_control';
@@ -50,7 +53,6 @@ Procedure fpc_geteipasebx;[external name 'fpc_geteipasebx'];
 {******************************************************************************
                           C library start/halt
  ******************************************************************************}
-{$asmmode ATT}
 
 procedure _FPC_libc_start; assembler; nostackframe; public name '_start';
 asm
diff --git rtl/linux/i386/si_c21.inc rtl/linux/i386/si_c21.inc
index c266e245ce..61e6014041 100644
--- rtl/linux/i386/si_c21.inc
+++ rtl/linux/i386/si_c21.inc
@@ -35,6 +35,8 @@
 
 {$asmmode att}
 
+{$L abitag.o}
+
 procedure __libc_csu_init; cdecl; external;
 procedure __libc_csu_fini; cdecl; external;
 procedure libc_start_main; external name '__libc_start_main';
diff --git rtl/linux/i386/si_dll.inc rtl/linux/i386/si_dll.inc
index 80b8eef062..a87ac89276 100644
--- rtl/linux/i386/si_dll.inc
+++ rtl/linux/i386/si_dll.inc
@@ -13,6 +13,7 @@
  **********************************************************************}
 {$asmmode att}
 
+{$L abitag.o}
 
 {******************************************************************************
                         Shared library start/halt
diff --git rtl/linux/i386/si_g.inc rtl/linux/i386/si_g.inc
index 1b7fad59e7..ccaa80d2b1 100644
--- rtl/linux/i386/si_g.inc
+++ rtl/linux/i386/si_g.inc
@@ -51,6 +51,8 @@ procedure libc_start_main; external name '__libc_start_main';
  ******************************************************************************}
 {$asmmode ATT}
 
+{$L abitag.o}
+
 procedure _FPC_proc_gprof_start; assembler; nostackframe; public name '_start';
 asm
   { First locate the start of the environment variables }
diff --git rtl/linux/i386/si_prc.inc rtl/linux/i386/si_prc.inc
index fd1aaa38fd..6a82aac038 100644
--- rtl/linux/i386/si_prc.inc
+++ rtl/linux/i386/si_prc.inc
@@ -13,6 +13,8 @@
  **********************************************************************}
 {$asmmode att}
 
+{$L abitag.o}
+
 {
  Linux ELF startup code for Free Pascal
 
diff --git rtl/linux/x86_64/si_dll.inc rtl/linux/x86_64/si_dll.inc
index b2905a3760..42bb0c809c 100644
--- rtl/linux/x86_64/si_dll.inc
+++ rtl/linux/x86_64/si_dll.inc
@@ -14,6 +14,8 @@
 
 {$asmmode gas}
 
+{$L abitag.o}
+
 procedure _FPC_shared_lib_haltproc(e:longint); cdecl; forward;
 
 procedure _FPC_shared_lib_start(argc:dword; argv,envp:pointer); cdecl; public name 'FPC_SHARED_LIB_START'; public name '_start';
diff --git rtl/linux/x86_64/si_g.inc rtl/linux/x86_64/si_g.inc
index b4acc45c8c..6e45f3b440 100644
--- rtl/linux/x86_64/si_g.inc
+++ rtl/linux/x86_64/si_g.inc
@@ -35,6 +35,8 @@
 
 {$asmmode gas}
 
+{$L abitag.o}
+
 var
   libc_environ: pchar; external name '__environ';
   libc_fpu_control: word; external name '__fpu_control';
loader-abitag.diff (5,180 bytes)   

Cyrax

2018-11-27 15:50

reporter   ~0112233

Attached patch (loader-abitag.diff) which will fix this issue.

C Western

2018-12-01 11:58

reporter   ~0112287

As discussed on the mailing list, trunk after r40272 fails to build the 32 bit version on Fedora 29 (on a 64 bit machine). This patch fixes the problem for me. (Without it INITTLS crashes, and it looks as though the program header used by INITTLS is not present in memory.)

Florian

2018-12-03 19:28

administrator   ~0112337

Can you please check if it works after r40454?

Cyrax

2018-12-04 14:31

reporter   ~0112351

Nope. It fails at this point :
make 'FPC=/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc1' 'OLDFPC=' next CYCLELEVEL=2
make[4]: Entering directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make rtlclean
make[5]: Entering directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make -C /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl clean
make[6]: Entering directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl'
/usr/bin/rm -f fpcmade.i386-linux Package.fpc ./ppas.sh script.res link.res  
/usr/bin/rm -f *.s *_ppas.sh ppas.sh ppaslink.sh
make -C linux clean
make[7]: Entering directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/linux'
/usr/bin/rm -f /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/system.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/fpintres.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/si_prc.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/si_c21g.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/si_c21.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/si_c.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/si_dll.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/si_uc.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/uuchar.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/unixtype.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/ctypes.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/baseunix.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/strings.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/objpas.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/macpas.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/iso7185.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/extpas.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/syscall.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/unixutil.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/heaptrc.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/lineinfo.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/lnfodwrf.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/termio.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/unix.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/linux.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/initc.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cmem.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/x86.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/ports.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cpu.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/mmx.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/linuxvcs.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/sysutils.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/typinfo.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/math.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/charset.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cpall.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/character.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/unixcp.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/getopts.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/errors.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/dl.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/dynlibs.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/types.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/sysconst.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/fpwidestring.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cthreads.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/classes.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/fgl.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/rtlconsts.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/dos.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cwstring.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/fpcylix.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/softfpu.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/sfpux80.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/ufloatx80.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/sfpu128.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/ufloat128.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/exeinfo.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1250.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1251.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1252.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1253.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1254.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1255.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1256.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1257.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1258.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp437.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp646.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp737.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp775.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp850.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp852.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp855.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp856.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp857.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp860.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp861.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp862.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp863.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp864.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp865.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp866.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp869.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp874.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp3021.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_1.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_2.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_3.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_4.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_5.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_6.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_7.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_8.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_9.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_10.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_11.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_13.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_14.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_15.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_16.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cpkoi8_r.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cpkoi8_u.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/unicodedata.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/unicodenumtable.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/syslinux.ppu /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/linux.ppu
/usr/bin/rm -f /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/system.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/fpintres.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/si_prc.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/si_c21g.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/si_c21.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/si_c.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/si_dll.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/si_uc.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/uuchar.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/unixtype.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/ctypes.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/baseunix.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/strings.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/objpas.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/macpas.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/iso7185.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/extpas.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/syscall.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/unixutil.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/heaptrc.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/lineinfo.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/lnfodwrf.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/termio.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/unix.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/linux.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/initc.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cmem.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/x86.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/ports.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cpu.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/mmx.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/linuxvcs.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/sysutils.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/typinfo.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/math.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/charset.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cpall.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/character.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/unixcp.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/getopts.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/errors.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/dl.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/dynlibs.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/types.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/sysconst.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/fpwidestring.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cthreads.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/classes.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/fgl.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/rtlconsts.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/dos.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cwstring.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/fpcylix.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/softfpu.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/sfpux80.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/ufloatx80.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/sfpu128.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/ufloat128.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/exeinfo.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1250.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1251.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1252.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1253.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1254.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1255.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1256.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1257.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp1258.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp437.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp646.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp737.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp775.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp850.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp852.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp855.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp856.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp857.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp860.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp861.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp862.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp863.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp864.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp865.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp866.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp869.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp874.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp3021.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_1.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_2.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_3.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_4.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_5.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_6.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_7.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_8.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_9.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_10.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_11.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_13.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_14.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_15.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cp8859_16.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cpkoi8_r.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/cpkoi8_u.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/unicodedata.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/unicodenumtable.o /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/linux.o
/usr/bin/rm -f /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/math.rst /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/typinfo.rst /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/sysconst.rst /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux/rtlconsts.rst
/usr/bin/rm -f fpcmade.i386-linux Package.fpc ./ppas.sh script.res link.res  
/usr/bin/rm -f *.s *_ppas.sh ppas.sh ppaslink.sh
make[7]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/linux'
make[6]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl'
make[5]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make rtl
make[5]: Entering directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make -C /mnt/shares/ohjelmointi2/fpc/source/git_source/rtl 'OPT=-gw2 -godwarfsets -godwarfmethodclassprefix -gl -O- -Xs- -Si- -vbq -Sew- -dEXTDEBUG  -dTEST_WIN32_SEH   ' all
make[6]: Entering directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl'
make -C linux all
make[7]: Entering directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/linux'
/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../i386 -Fi../unix -Fii386 -FE. -FU/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux -gw2 -godwarfsets -godwarfmethodclassprefix -gl -O- -Xs- -Si- -vbq -Sew- -dEXTDEBUG -dTEST_WIN32_SEH -di386 -dRELEASE  -Us -Sg system.pp
make[7]: *** [Makefile:3912: system.ppu] Segmentation fault (core dumped)
make[7]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/linux'
make[6]: *** [Makefile:2057: linux_all] Error 2
make[6]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl'
make[5]: *** [Makefile:4552: rtl] Error 2
make[5]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make[4]: *** [Makefile:4403: next] Error 2
make[4]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make[3]: *** [Makefile:4413: ppc2] Error 2
make[3]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make[2]: *** [Makefile:4422: cycle] Error 2
make[2]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make[1]: *** [Makefile:2834: compiler_cycle] Error 2
make[1]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source'
make: *** [Makefile:2866: build-stamp.i386-linux] Error 2
Removing compiler/i386/bin/
Removing compiler/i386/units/
Removing compiler/ppc1
Removing compiler/revision.inc
Removing rtl/units/
Already on 'fpc_dev_bleeding_edge'
M	compiler/pp.lpi
M	rtl/inc/lnfodwrf.pp

Florian

2018-12-04 22:26

administrator   ~0112361

I see, I missed bootstrapping, please recheck with at least r40468.

C Western

2018-12-04 22:55

reporter   ~0112362

I hate to say this, but the 32 bit build on Fedora 29 now runs ppc1 OK, but ppc2 crashes at the same place in INITTLS

Florian

2018-12-05 20:11

administrator   ~0112373

Can you check if ppc2 has a proper abi tag?

C Western

2018-12-05 22:06

reporter   ~0112381

objdump -x /home/me/fpc/trunk/fpcsrc/compiler/ppc2 | more

/home/me/fpc/trunk/fpcsrc/compiler/ppc2: file format elf32-i386
/home/me/fpc/trunk/fpcsrc/compiler/ppc2
architecture: i386, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x08049000

Program Header:
    LOAD off 0x00001000 vaddr 0x08049000 paddr 0x08049000 align 2**12
         filesz 0x00273180 memsz 0x00273180 flags r-x
    LOAD off 0x00275000 vaddr 0x082bd000 paddr 0x082bd000 align 2**12
         filesz 0x000231bc memsz 0x000231bc flags r--
    LOAD off 0x002981c0 vaddr 0x082e11c0 paddr 0x082e11c0 align 2**12
         filesz 0x000f8b40 memsz 0x00104404 flags rw-
    NOTE off 0x0038fea0 vaddr 0x083d8ea0 paddr 0x083d8ea0 align 2**2
         filesz 0x00000020 memsz 0x00000020 flags rw-
   STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
         filesz 0x00000000 memsz 0x00000000 flags rw-

Sections:
Idx Name Size VMA LMA File off Algn
  0 .text 00273180 08049000 08049000 00001000 2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .rodata 000231bc 082bd000 082bd000 00275000 2**4
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .data 000f7ce0 082e11c0 082e11c0 002981c0 2**4
                  CONTENTS, ALLOC, LOAD, DATA
  3 .note.ABI-tag 00000020 083d8ea0 083d8ea0 0038fea0 2**2
                  CONTENTS, ALLOC, LOAD, DATA
  4 .fpcdata 00000e40 083d8ec0 083d8ec0 0038fec0 2**4
                  CONTENTS, ALLOC, LOAD, DATA
  5 .bss 0000b8c4 083d9d00 083d9d00 00390d00 2**4
                  ALLOC
  6 .stab 0037e09c 00000000 00000000 00390d00 2**2
                  CONTENTS, READONLY, DEBUGGING
  7 .stabstr 00a07a47 00000000 00000000 0070ed9c 2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_frame 0004ce2c 00000000 00000000 011167e4 2**2
                  CONTENTS, READONLY, DEBUGGING

C Western

2018-12-05 22:14

reporter   ~0112383

Is it something to do with the order in the file? If I apply the loader-abitag patch, and comment out your ($I abitag.inc} the resulting ppc2 has the abi tag at the front:
architecture: i386, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x08049000

Program Header:
    LOAD off 0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12
         filesz 0x00000114 memsz 0x00000114 flags r--
    LOAD off 0x00001000 vaddr 0x08049000 paddr 0x08049000 align 2**12
         filesz 0x00273170 memsz 0x00273170 flags r-x
    LOAD off 0x00275000 vaddr 0x082bd000 paddr 0x082bd000 align 2**12
         filesz 0x000231bc memsz 0x000231bc flags r--
    LOAD off 0x002981c0 vaddr 0x082e11c0 paddr 0x082e11c0 align 2**12
         filesz 0x000f8b20 memsz 0x001043e4 flags rw-
    NOTE off 0x000000f4 vaddr 0x080480f4 paddr 0x080480f4 align 2**2
         filesz 0x00000020 memsz 0x00000020 flags r--
   STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
         filesz 0x00000000 memsz 0x00000000 flags rw-

Sections:
Idx Name Size VMA LMA File off Algn
  0 .note.ABI-tag 00000020 080480f4 080480f4 000000f4 2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .text 00273170 08049000 08049000 00001000 2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .rodata 000231bc 082bd000 082bd000 00275000 2**4
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .data 000f7ce0 082e11c0 082e11c0 002981c0 2**4
                  CONTENTS, ALLOC, LOAD, DATA
  4 .fpcdata 00000e40 083d8ea0 083d8ea0 0038fea0 2**4
                  CONTENTS, ALLOC, LOAD, DATA
  5 .bss 0000b8c4 083d9ce0 083d9ce0 00390ce0 2**4
                  ALLOC
  6 .stab 0037e060 00000000 00000000 00390ce0 2**2
                  CONTENTS, READONLY, DEBUGGING
  7 .stabstr 00a07a2a 00000000 00000000 0070ed40 2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_frame 0004ce1c 00000000 00000000 0111676c 2**2
                  CONTENTS, READONLY, DEBUGGING

Cyrax

2018-12-06 23:03

reporter   ~0112412

r40481 fails to build.

/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc2 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../i386 -Fi../unix -Fii386 -FE. -FU/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux -gw2 -godwarfsets -godwarfmethodclassprefix -gl -O- -Xs- -Si- -vbq -Sew- -dEXTDEBUG -dTEST_WIN32_SEH -di386 -dRELEASE  -Us -Sg system.pp
make[7]: *** [Makefile:3912: system.ppu] Segmentation fault (core dumped)
make[7]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/linux'
make[6]: *** [Makefile:2057: linux_all] Error 2
make[6]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl'
make[5]: *** [Makefile:4552: rtl] Error 2
make[5]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make[4]: *** [Makefile:4403: next] Error 2
make[4]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make[3]: *** [Makefile:4417: ppc3] Error 2
make[3]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make[2]: *** [Makefile:4422: cycle] Error 2
make[2]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make[1]: *** [Makefile:2834: compiler_cycle] Error 2
make[1]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source'
make: *** [Makefile:2866: build-stamp.i386-linux] Error 2


objdump --headers --private-headers --file-headers --archive-headers /mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc2

/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc2:     file format elf32-i386
/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc2
architecture: i386, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x08049000

Program Header:
    LOAD off    0x00001000 vaddr 0x08049000 paddr 0x08049000 align 2**12
         filesz 0x002d14e0 memsz 0x002d14e0 flags r-x
    LOAD off    0x002d3000 vaddr 0x0831b000 paddr 0x0831b000 align 2**12
         filesz 0x00024574 memsz 0x00024574 flags r--
    LOAD off    0x002f7580 vaddr 0x08340580 paddr 0x08340580 align 2**12
         filesz 0x000f5f00 memsz 0x001017e4 flags rw-
    NOTE off    0x003ecad0 vaddr 0x08435ad0 paddr 0x08435ad0 align 2**2
         filesz 0x00000020 memsz 0x00000020 flags rw-
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
         filesz 0x00000000 memsz 0x00000000 flags rw-

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         002d14e0  08049000  08049000  00001000  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .rodata       00024574  0831b000  0831b000  002d3000  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .data         000f5550  08340580  08340580  002f7580  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  3 .note.ABI-tag 00000020  08435ad0  08435ad0  003ecad0  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  4 .fpcdata      00000990  08435af0  08435af0  003ecaf0  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  5 .bss          0000b8e4  08436480  08436480  003ed480  2**4
                  ALLOC
  6 .debug_aranges 000177f8  00000000  00000000  003ed480  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_info   004329df  00000000  00000000  00404c78  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_abbrev 00014687  00000000  00000000  00837657  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_line   000e145a  00000000  00000000  0084bcde  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_frame  0006dec0  00000000  00000000  0092d138  2**2
                  CONTENTS, READONLY, DEBUGGING

Cyrax

2018-12-06 23:13

reporter   ~0112413

It's definitely something doing with order of the sections in the binary executable. Using my patch will give this order.

objdump --headers --private-headers --file-headers --archive-headers /mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc2

/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc2:     file format elf32-i386
/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc2
architecture: i386, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x08049000

Program Header:
    LOAD off    0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12
         filesz 0x00000114 memsz 0x00000114 flags r--
    LOAD off    0x00001000 vaddr 0x08049000 paddr 0x08049000 align 2**12
         filesz 0x002d14d0 memsz 0x002d14d0 flags r-x
    LOAD off    0x002d3000 vaddr 0x0831b000 paddr 0x0831b000 align 2**12
         filesz 0x00024574 memsz 0x00024574 flags r--
    LOAD off    0x002f7580 vaddr 0x08340580 paddr 0x08340580 align 2**12
         filesz 0x000f5ee0 memsz 0x001017c4 flags rw-
    NOTE off    0x000000f4 vaddr 0x080480f4 paddr 0x080480f4 align 2**2
         filesz 0x00000020 memsz 0x00000020 flags r--
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
         filesz 0x00000000 memsz 0x00000000 flags rw-

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .note.ABI-tag 00000020  080480f4  080480f4  000000f4  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .text         002d14d0  08049000  08049000  00001000  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .rodata       00024574  0831b000  0831b000  002d3000  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .data         000f5550  08340580  08340580  002f7580  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  4 .fpcdata      00000990  08435ad0  08435ad0  003ecad0  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  5 .bss          0000b8e4  08436460  08436460  003ed460  2**4
                  ALLOC
  6 .debug_aranges 000177f0  00000000  00000000  003ed460  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_info   004329cc  00000000  00000000  00404c50  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_abbrev 00014687  00000000  00000000  0083761c  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_line   000e1436  00000000  00000000  0084bca3  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_frame  0006deb0  00000000  00000000  0092d0dc  2**2
                  CONTENTS, READONLY, DEBUGGING

Cyrax

2019-01-29 18:37

reporter   ~0113710

Due to changes in r41081, I have to revert my changes at rtl/linux/system.pp.

So r41122 fails to build.

/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc2 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../i386 -Fi../unix -Fii386 -FE. -FU/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/units/i386-linux -gw2 -godwarfsets -godwarfmethodclassprefix -gl -O- -Xs- -Si- -vbq -Sew- -dEXTDEBUG -dTEST_WIN32_SEH -di386 -dRELEASE  -Us -Sg system.pp
make[7]: *** [Makefile:3937: system.ppu] Segmentation fault (core dumped)
make[7]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl/linux'
make[6]: *** [Makefile:2063: linux_all] Error 2
make[6]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/rtl'
make[5]: *** [Makefile:4576: rtl] Error 2
make[5]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make[4]: *** [Makefile:4427: next] Error 2
make[4]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make[3]: *** [Makefile:4441: ppc3] Error 2
make[3]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make[2]: *** [Makefile:4446: cycle] Error 2
make[2]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler'
make[1]: *** [Makefile:2844: compiler_cycle] Error 2
make[1]: Leaving directory '/mnt/shares/ohjelmointi2/fpc/source/git_source'
make: *** [Makefile:2876: build-stamp.i386-linux] Error 2


objdump --headers --private-headers --file-headers --archive-headers /mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc2

/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc2:     file format elf32-i386
/mnt/shares/ohjelmointi2/fpc/source/git_source/compiler/ppc2
architecture: i386, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x08049000

Program Header:
    LOAD off    0x00001000 vaddr 0x08049000 paddr 0x08049000 align 2**12
         filesz 0x002d2360 memsz 0x002d2360 flags r-x
    LOAD off    0x002d4000 vaddr 0x0831c000 paddr 0x0831c000 align 2**12
         filesz 0x00024724 memsz 0x00024724 flags r--
    LOAD off    0x002f9000 vaddr 0x08341000 paddr 0x08341000 align 2**12
         filesz 0x000f6360 memsz 0x00101c44 flags rw-
    NOTE off    0x003ee9a0 vaddr 0x084369a0 paddr 0x084369a0 align 2**2
         filesz 0x00000020 memsz 0x00000020 flags rw-
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
         filesz 0x00000000 memsz 0x00000000 flags rw-

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         002d2360  08049000  08049000  00001000  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .rodata       00024724  0831c000  0831c000  002d4000  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .data         000f59a0  08341000  08341000  002f9000  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  3 .note.ABI-tag 00000020  084369a0  084369a0  003ee9a0  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  4 .fpcdata      000009a0  084369c0  084369c0  003ee9c0  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  5 .bss          0000b8e4  08437360  08437360  003ef360  2**4
                  ALLOC
  6 .debug_aranges 00017858  00000000  00000000  003ef360  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_info   00446b0a  00000000  00000000  00406bb8  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_abbrev 00014923  00000000  00000000  0084d6c2  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_line   000e1923  00000000  00000000  00861fe5  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_frame  0006e03c  00000000  00000000  00943908  2**2
                  CONTENTS, READONLY, DEBUGGING

Cyrax

2019-01-30 00:55

reporter  

loader-abitag2.diff (8,482 bytes)   
diff --git rtl/linux/Makefile rtl/linux/Makefile
index 0c530cd8b2..83f41aec45 100644
--- rtl/linux/Makefile
+++ rtl/linux/Makefile
@@ -342,7 +342,7 @@ CPU_UNITS=
 SYSINIT_UNITS=
 LOADERS=prt0 dllprt0 cprt0 gprt0
 ifeq ($(ARCH),i386)
-override LOADERS=
+override LOADERS=abitag
 CPU_UNITS=x86 ports cpu mmx
 SYSINIT_UNITS=si_prc si_c21g si_c21 si_c si_dll si_uc
 endif
diff --git rtl/linux/Makefile.fpc rtl/linux/Makefile.fpc
index 00fe28d6cc..b6890af75b 100644
--- rtl/linux/Makefile.fpc
+++ rtl/linux/Makefile.fpc
@@ -70,7 +70,7 @@ SYSINIT_UNITS=
 LOADERS=prt0 dllprt0 cprt0 gprt0
 
 ifeq ($(ARCH),i386)
-override LOADERS=
+override LOADERS=abitag
 CPU_UNITS=x86 ports cpu mmx
 SYSINIT_UNITS=si_prc si_c21g si_c21 si_c si_dll si_uc
 endif
diff --git rtl/linux/fpmake.inc rtl/linux/fpmake.inc
index db0077dfc3..493086e421 100644
--- rtl/linux/fpmake.inc
+++ rtl/linux/fpmake.inc
@@ -36,4 +36,8 @@ begin
     AddLoader('cprt21');
     AddLoader('gprt21');
     end;
-end;    
\ No newline at end of file
+  If (Defaults.CPU in [i386,x86_64]) Then
+    begin
+    AddLoader('abitag');
+    end;
+end;    
diff --git rtl/linux/i386/abitag.as rtl/linux/i386/abitag.as
new file mode 100644
index 0000000000..9098ca771b
--- /dev/null
+++ rtl/linux/i386/abitag.as
@@ -0,0 +1,29 @@
+#
+#   This file is part of the Free Pascal run time library.
+#   Copyright (c) 2002 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.
+#
+#**********************************************************************
+
+.file "abitag.as"
+
+        .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,4,0
+3:      .align 4
+
+	.section .note.GNU-stack,"",@progbits
+
diff --git rtl/linux/i386/si_c.inc rtl/linux/i386/si_c.inc
index 815c1c430d..729371f304 100644
--- rtl/linux/i386/si_c.inc
+++ rtl/linux/i386/si_c.inc
@@ -33,6 +33,8 @@
          argc <--- esp
 }
 
+{$asmmode ATT}
+
 var
   libc_environ: pchar; external name '__environ';
   libc_fpu_control: word; external name '__fpu_control';
@@ -50,7 +52,6 @@ Procedure fpc_geteipasebx;[external name 'fpc_geteipasebx'];
 {******************************************************************************
                           C library start/halt
  ******************************************************************************}
-{$asmmode ATT}
 
 procedure _FPC_libc_start; assembler; nostackframe; public name '_start';
 asm
diff --git rtl/linux/i386/si_dll.inc rtl/linux/i386/si_dll.inc
index 80b8eef062..2465e5995c 100644
--- rtl/linux/i386/si_dll.inc
+++ rtl/linux/i386/si_dll.inc
@@ -13,7 +13,6 @@
  **********************************************************************}
 {$asmmode att}
 
-
 {******************************************************************************
                         Shared library start/halt
  ******************************************************************************}
diff --git rtl/linux/system.pp rtl/linux/system.pp
index a0654d82dc..0907a34607 100644
--- rtl/linux/system.pp
+++ rtl/linux/system.pp
@@ -649,9 +649,12 @@ begin
 end;
 
 {$if FPC_FULLVERSION>30200}
-{$if defined(CPUI386) or defined(CPUARM)}
+{$if defined(CPUI386) or defined(CPUX86_64)}
+{$L abitag.o}
+{$endif defined(CPUI386) or defined(CPUX86_64)}
+{$if defined(CPUARM)}
 {$I abitag.inc}
-{$endif defined(CPUI386) or defined(CPUARM)}
+{$endif defined(CPUARM)}
 {$endif FPC_FULLVERSION>30200}
 
 begin
diff --git rtl/linux/x86_64/cprt0.as rtl/linux/x86_64/cprt0.as
index 1a228227ab..15e291435f 100644
--- rtl/linux/x86_64/cprt0.as
+++ rtl/linux/x86_64/cprt0.as
@@ -193,18 +193,4 @@ ___fpc_ret_rbp:
 */
         .comm entryinfo,104
 
-/* 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,4,0
-3:      .align 4
-
 	.section	.note.GNU-stack,"",@progbits
diff --git rtl/linux/x86_64/dllprt0.as rtl/linux/x86_64/dllprt0.as
index 709f8c7b34..bce6480c34 100644
--- rtl/linux/x86_64/dllprt0.as
+++ rtl/linux/x86_64/dllprt0.as
@@ -138,20 +138,4 @@ __data_start:
 */
         .comm entryinfo,104
 
-
-/* We need this stuff to make gdb behave itself, otherwise
-   gdb will chokes with SIGILL when trying to debug apps.
-
-Makes ld choke:
-        .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,4,0
-3:      .align 4
-*/
 	.section	.note.GNU-stack,"",@progbits
diff --git rtl/linux/x86_64/gprt0.as rtl/linux/x86_64/gprt0.as
index ea944ca89f..8600efa8b0 100644
--- rtl/linux/x86_64/gprt0.as
+++ rtl/linux/x86_64/gprt0.as
@@ -213,18 +213,4 @@ ___fpc_ret_rbp:
 */
         .comm entryinfo,104
 
-/* 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,4,0
-3:      .align 4
-
 	.section	.note.GNU-stack,"",@progbits
diff --git rtl/linux/x86_64/prt0.as rtl/linux/x86_64/prt0.as
index 12f325a605..46fa530980 100644
--- rtl/linux/x86_64/prt0.as
+++ rtl/linux/x86_64/prt0.as
@@ -150,19 +150,4 @@ __data_start:
 */
         .comm entryinfo,104
 
-
-/* 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,4,0
-3:      .align 4
-
 	.section	.note.GNU-stack,"",@progbits
diff --git rtl/linux/x86_64/si_c.inc rtl/linux/x86_64/si_c.inc
index bd375c6611..5fcf255e15 100644
--- rtl/linux/x86_64/si_c.inc
+++ rtl/linux/x86_64/si_c.inc
@@ -35,7 +35,6 @@
 
 {$asmmode gas}
 
-{$L abitag.o}
 var
   libc_environ: pchar; external name '__environ';
   libc_fpu_control: word; external name '__fpu_control';
diff --git rtl/linux/x86_64/si_dll.inc rtl/linux/x86_64/si_dll.inc
index b2905a3760..cacb316dff 100644
--- rtl/linux/x86_64/si_dll.inc
+++ rtl/linux/x86_64/si_dll.inc
@@ -44,29 +44,3 @@ asm
         syscall
         jmp     _FPC_shared_lib_haltproc
 end;
-
-{ Define a symbol for the first piece of initialized data.  }
-(*      .data
-        .globl __data_start
-__data_start:
-        .long 0
-        .weak data_start
-        data_start = __data_start *)
-
-
-(* We need this stuff to make gdb behave itself, otherwise
-   gdb will chokes with SIGILL when trying to debug apps.
-
-Makes ld choke:
-        .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,4,0
-3:      .align 4
-*)
-
diff --git rtl/linux/x86_64/si_g.inc rtl/linux/x86_64/si_g.inc
index b4acc45c8c..cab972428a 100644
--- rtl/linux/x86_64/si_g.inc
+++ rtl/linux/x86_64/si_g.inc
@@ -180,21 +180,6 @@ procedure ini_dummy;
 
     hlt                     { Crash if somehow `exit' does return.  }
 
-    { 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,4,0
-3:  .align 4
-*)
   end;
 
 procedure _FPC_libc_haltproc(e:longint); assembler; nostackframe; public name '_haltproc';
diff --git rtl/linux/x86_64/si_prc.inc rtl/linux/x86_64/si_prc.inc
index 67a15f8139..bbc5e6ceac 100644
--- rtl/linux/x86_64/si_prc.inc
+++ rtl/linux/x86_64/si_prc.inc
@@ -33,8 +33,6 @@
 
 {$asmmode gas}
 
-{$L abitag.o}
-
 procedure InitTLS; [external name 'FPC_INITTLS'];
 
 { so far, I found no case where this is actually called, so it is a dummy so far (FK) }
loader-abitag2.diff (8,482 bytes)   

Cyrax

2019-01-30 00:56

reporter   ~0113724

Attached updated patch (loader-abitag2.diff).

Cyrax

2019-06-23 22:09

reporter   ~0116877

As on r42276, this bug seems to be fixed at time being.
It probably was distros binutils package which made incorrect binaries. Current binutils version is 2.32-1.10.

C Western

2019-11-03 22:18

reporter   ~0119024

I can also confirm that this seems to not to be an issue in Fedora 31 - binutils-2.32-24 with the current SVN

Florian

2019-11-03 22:30

administrator   ~0119027

Closed as it is most likely related to binutils 2.31 and this is fixed in later versions.

Issue History

Date Modified Username Field Change
2018-10-29 13:12 Cyrax New Issue
2018-10-29 13:12 Cyrax File Added: project1.zip
2018-10-29 13:13 Cyrax File Added: output i386 linux.txt
2018-10-29 13:13 Cyrax File Added: output x86_64 linux.txt
2018-10-29 13:15 Cyrax File Added: project1.s-i386-linux.zip
2018-10-29 13:16 Cyrax File Added: project1.s-x86-64-linux.zip
2018-10-29 13:24 Cyrax Note Added: 0111652
2018-10-29 13:27 Cyrax File Added: fpcdebug.txt and tree.log i386-linux.zip
2018-10-29 13:29 Cyrax File Added: fpcdebug.txt and tree.log x86_64-linux.zip
2018-10-29 13:44 Cyrax Note Added: 0111655
2018-11-04 03:25 Cyrax Note Added: 0111770
2018-11-04 03:26 Cyrax Note Added: 0111771
2018-11-04 03:59 Cyrax Note Added: 0111772
2018-11-04 04:33 Cyrax Note Added: 0111773
2018-11-04 08:46 Juha Manninen Relationship added related to 0034430
2018-11-11 04:59 Cyrax Note Added: 0111898
2018-11-11 05:04 Cyrax Note Edited: 0111898 View Revisions
2018-11-27 15:39 Cyrax Note Added: 0112232
2018-11-27 15:48 Cyrax File Added: loader-abitag.diff
2018-11-27 15:50 Cyrax Note Added: 0112233
2018-12-01 11:58 C Western Note Added: 0112287
2018-12-03 19:28 Florian Note Added: 0112337
2018-12-04 14:31 Cyrax Note Added: 0112351
2018-12-04 22:26 Florian Note Added: 0112361
2018-12-04 22:55 C Western Note Added: 0112362
2018-12-05 20:11 Florian Note Added: 0112373
2018-12-05 22:06 C Western Note Added: 0112381
2018-12-05 22:14 C Western Note Added: 0112383
2018-12-06 23:03 Cyrax Note Added: 0112412
2018-12-06 23:13 Cyrax Note Added: 0112413
2019-01-29 18:37 Cyrax Note Added: 0113710
2019-01-30 00:55 Cyrax File Added: loader-abitag2.diff
2019-01-30 00:56 Cyrax Note Added: 0113724
2019-06-23 22:09 Cyrax Note Added: 0116877
2019-11-03 22:18 C Western Note Added: 0119024
2019-11-03 22:30 Florian Assigned To => Florian
2019-11-03 22:30 Florian Status new => resolved
2019-11-03 22:30 Florian Resolution open => unable to reproduce
2019-11-03 22:30 Florian Fixed in Version => 3.3.1
2019-11-03 22:30 Florian FPCTarget => -
2019-11-03 22:30 Florian Note Added: 0119027