[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4,
From: |
jbthiel at gmail dot com |
Subject: |
[Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later |
Date: |
Thu, 17 Feb 2022 18:16:10 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28903
--- Comment #3 from John B Thiel <jbthiel at gmail dot com> ---
Created attachment 13986
--> https://sourceware.org/bugzilla/attachment.cgi?id=13986&action=edit
Complete test case demonstration package
Here is a complete test case demonstration package, including
Makefile
myprog.pas .o .map
myprog (executable that segfaults, as built with binutils 2.37_p1-r1 in
Gentoo)
link.res
ppas.sh (link script)
and the 2 system .o files (prt0.o system.o)
$ make clean
rm myprog.o myprog.map myprog link.res ppas.sh testcase-28903.zip
$ make dist
/usr/local/fpc-2.6.4/bin/fpc -Xm -sh myprog.pas
Free Pascal Compiler version 2.6.4 [2014/03/03] for x86_64
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling myprog.pas
Closing script ppas.sh
4 lines compiled, 0.0 sec
sh ppas.sh
Linking myprog
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
zip testcase-28903.zip Makefile myprog.pas myprog.o myprog.map myprog link.res
ppas.sh /usr/local/fpc-2.6.4/lib/fpc/2.6.4/units/x86_64-linux/rtl/prt0.o
/usr/local/fpc-2.6.4/lib/fpc/2.6.4/units/x86_64-linux/rtl/system.o
adding: Makefile (deflated 46%)
adding: myprog.pas (stored 0%)
adding: myprog.o (deflated 68%)
adding: myprog.map (deflated 87%)
adding: myprog (deflated 68%)
adding: link.res (deflated 85%)
adding: ppas.sh (deflated 36%)
adding: usr/local/fpc-2.6.4/lib/fpc/2.6.4/units/x86_64-linux/rtl/prt0.o
(deflated 69%)
adding: usr/local/fpc-2.6.4/lib/fpc/2.6.4/units/x86_64-linux/rtl/system.o
(deflated 76%)
$ ./myprog
Segmentation fault
$ cat ppas.sh
#!/bin/sh
DoExitAsm ()
{ echo "An error occurred while assembling $1"; exit 1; }
DoExitLink ()
{ echo "An error occurred while linking $1"; exit 1; }
echo Linking myprog
OFS=$IFS
IFS="
"
/usr/bin/ld -b elf64-x86-64 -m elf_x86_64 -Map myprog.map -L. -o myprog
link.res
if [ $? != 0 ]; then DoExitLink myprog; fi
IFS=$OFS
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/28903] New: LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, jbthiel at gmail dot com, 2022/02/17
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, jbthiel at gmail dot com, 2022/02/17
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, hjl.tools at gmail dot com, 2022/02/17
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later,
jbthiel at gmail dot com <=
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, hjl.tools at gmail dot com, 2022/02/17
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, jbthiel at gmail dot com, 2022/02/17
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, hjl.tools at gmail dot com, 2022/02/17
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, hjl.tools at gmail dot com, 2022/02/17
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, jbthiel at gmail dot com, 2022/02/17
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, hjl.tools at gmail dot com, 2022/02/17
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, jbthiel at gmail dot com, 2022/02/17
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, hjl.tools at gmail dot com, 2022/02/17
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, hjl.tools at gmail dot com, 2022/02/17
- [Bug ld/28903] LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later, hjl.tools at gmail dot com, 2022/02/17