[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 19:36:35 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28903
--- Comment #10 from John B Thiel <jbthiel at gmail dot com> ---
(In reply to H.J. Lu from comment #9)
> (In reply to John B Thiel from comment #8)
> > (In reply to H.J. Lu from comment #6)
> > > What is the last known working binutils?
> >
> > The last known good is binutils-2.35.2
>
> binutils-2.35.2 doesn't work for me:
>
> [hjl@gnu-tgl-3 pr28903]$ ./ld -V
> GNU ld (GNU Binutils) 2.35.2
> Supported emulations:
> elf_x86_64
> elf32_x86_64
> elf_i386
> elf_iamcu
> elf_l1om
> elf_k1om
> [hjl@gnu-tgl-3 pr28903]$ make
> ./ld -b elf64-x86-64 -m elf_x86_64 -Map myprog.map -L. -T link.t -o x
> ./x
> make: *** [Makefile:5: all] Segmentation fault
> [hjl@gnu-tgl-3 pr28903]$
>
> It crashed during start up.
Well, now we are into your territory, I hope you can figure it out. What I can
tell you is binutils-2.35.2 and earlier have been working solid reliable for a
long time, years.
I noticed you are using the -T flag. The FPC specifically doesn't use that,
something to do with the builtin system script that they override with their
own, or the other way round.
For a possible clue, here is what the FPC devs had a guess it relates to,
copied from the FPC bug report I put at
https://gitlab.com/freepascal.org/fpc/source/-/issues/39324
https://wiki.freepascal.org/User_Changes_3.2.0#GNU_Binutils_2.19.1_or_later_are_required_by_default
GNU Binutils 2.19.1 or later are required by default
Old behaviour: The compiler invocation of the linker always resulted in a
warning stating "did you forget -T?"
New behaviour: The compiler now uses a different way to invoke the linker,
which prevents this warning, but this requires functionality that is only
available in GNU Binutils 2.19 and later.
Reason: Get rid of the linker warning, which was caused by the fact that we
used the linker in an unsupported way (and which hence occasionally caused
issues).
Remedy: If you have a system with an older version of GNU Binutils, you can
use the new -X9 command line parameter to make the compiler revert to the old
behaviour. You will not be able to (easily) bootstrap the new version of FPC on
such a system though, so use another system with a more up-to-date version of
GNU Binutils for that.
---
https://gitlab.com/freepascal.org/fpc/source/-/commit/4564bffb85e5947cf7bdfa3e2c67bc032775d0c5
* use binutils 2.19+ linker script "augmentation" functionality to specify
how the fpc sections have to be linked *on Linux*. This prevents the
"did you forget -T" warnings from ld, and in general is more correct than
our previous approach of specifying a complete linker script without -T
and hoping that there won't be any unexpected interactions with ld's
built-in linker script (fixed version of r31664, thanks to Alan Modra)
o use the new -X9 command line option to generate linker scripts that
are compatible with binutils older than 2.19 (reverts to the old
behaviour)
Note it is *not* confirmed that this is the actual issue here. This prior
issue relates to something in binutils 2.19, whereas I have fully confirmed
this current issue is between binutils-2.35 and 2.36. Maybe it's the same
problem, or not.
--
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, 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, 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, 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/18
- [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/18
- [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/18
- [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/18
- [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/27
- [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/27
- [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/28