bug-binutils
[Top][All Lists]
Advanced

[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:37:19 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28903

--- Comment #5 from John B Thiel <jbthiel at gmail dot com> ---
(In reply to H.J. Lu from comment #4)
> (In reply to John B Thiel from comment #3)
> > Created attachment 13986 [details]
> > 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
> 
> I don't have /usr/local/fpc-2.6.4/bin/fpc and I don't need it.  I need the
> FULL linker command line with ALL linker inputs to create the broken
> executable.


It is there.
I just showed the whole sequence to fully document, so you can see what's going
on.
The /usr/local/fpc-2.6.4/bin/fpc  with -sh flag generates a link script
(ppas.sh) and link.res and myprog.o

The ppas.sh you see there (and in the zipfile) invokes the linker as:
/usr/bin/ld -b elf64-x86-64 -m elf_x86_64     -Map myprog.map -L. -o myprog
link.res

The link.res has 3 files in the INPUT section:
  myprog.o
  and the 2 system files (prt0.o system.o), which I gave with the complete
subpath, and you can see in the zipfile.

All these files are in the attached zipfile. 
This should be the complete reproducible package needed, from what I can tell.  
I can't see any other files referenced.  If there are, let me know.

Just don't run 'make clean' or 'make dist' again.  
Start with ppas.sh

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

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