bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LD producing SegFault executables with FreePascal 2.6.4, in Binutils


From: John B Thiel
Subject: Re: LD producing SegFault executables with FreePascal 2.6.4, in Binutils-2.36.1 and later
Date: Mon, 28 Feb 2022 08:28:40 -0800



On Mon, Feb 28, 2022 at 6:43 AM Nick Clifton <nickc@redhat.com> wrote:
Hi John,

> If you need some exe/object files, traces, etc. let me know and I will try to supply.
Yes please.  If you can give me an x86_64 version of the failing executable I can try examining it to see what is going wrong.
Is there any chance that you could provide a test case that only uses object
files and libraries ?  Ie no Pascal compiler involved, just a set of binary
files and the linker command line that combines them (and fails to create a
working executable).


Please see the zipfile attachment
  "Complete test case demonstration package"
I put at
  https://sourceware.org/bugzilla/show_bug.cgi?id=28903#c3

It has a fully built example with makefile, pas source, all object files, link shell script (ppas.sh) and response file (link.res), and faulty bad executable.

HJ Lu has done some good diagnosing there, and I think basically identified the problem.  It is believed the FPC 264 linker scripts are faulty as generated.  But nevertheless, they worked for years, prior to whatever was recently tightened up in binutils/LD.

So now it is a question of relaxing whatever constraints in LD were recently tightened,  or adding a special case exception, so to maintain back-compatibility with FPC 2.6.4

 
> Because FPC/Lazarus is a giant self-contained software stack, the approximate equivalent of binutils + gcc + libc + an entire graphical windows/component/object system.

OK.  I am sure that you already know that problems like this are likely
to continue appearing as time goes by, but I will do my best to help.

 
They really shouldn't and generally don't;  this is a very unusual situation.
Free Pascal is a largely self-contained ecosystem, specifically by design, to avoid such dependencies.  And this is one of many benefits/reasons for developers to use FPC, it provides a measure of insulation.

In fact, this dependency on the external linker LD on Linux is an aberration. On other platforms, FPC uses its own builtin linker, and in later versions I think started doing so on Linux too,  specifically to avoid these kinds of problems.

Thanks Nick for any help on this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]