* ld from binutils 2.9.1 dynamic output dumps core on Linux/Alpha
@ 1998-05-23 22:23 Mike "Ford" Ditto
1998-05-24 18:40 ` Christoph Zens
1998-05-26 16:34 ` Richard Henderson
0 siblings, 2 replies; 7+ messages in thread
From: Mike "Ford" Ditto @ 1998-05-23 22:23 UTC (permalink / raw)
To: bug-gnu-utils, axp-list
I am trying to build binutils 2.9.1 under RedHat Linux 4.1 for alpha,
using the stock gcc 2.7.2.1.
The ld program is built sucessfully and when it is run it creates
object files with apparent success, but the programs don't run, they
dump core immediately. If the program is statically linked (gcc
-static) then it works, but dynamically linked programs created by
2.9.1 ld dump core.
I have also tried building these same binutils using gcc 2.8.1 with
the same results.
As a test, I compile and link a simple hello world program, first using
/usr/bin/ld, then using binutils-2.9.1/ld/ld-new . The same object files
are being linked in either case, but the first one runs, and the second
one dumps core.
I can make the object files involved available to anyone if that helps
understand this problem.
-=] Ford [=-
"But everybody wants a rock (In Real Life: Mike Ditto)
to wind a piece of string around." ford@omnicron.com
- They Might be Giants, http://www.omnicron.com/~ford/ford.html
"We want a rock"
ford@alpha2> cd /usr/local/src/binutils*
ford@alpha2> pwd
/usr/local/src/binutils-2.9.1
ford@alpha2> cd ld
ford@alpha2> cat h.c
main(){puts("Hello world");}
ford@alpha2> gcc -O2 -c h.c
ford@alpha2> /usr/bin/ld --version
ld version 2.7 (with BFD 2.7.0.2)
ford@alpha2> gcc --version
2.7.2.1
ford@alpha2> ./ld-new --version
GNU ld 2.9.1
Copyright 1997 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
Supported emulations:
elf64alpha
alpha
ford@alpha2> gcc -v -o a.out.ld h.o
Reading specs from /usr/lib/gcc-lib/alpha-linux/2.7.2.1/specs
gcc version 2.7.2.1
ld -m elf64alpha -G 8 -O1 -dynamic-linker /lib/ld.so.1 -o a.out.ld /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib/gcc-lib/alpha-linux/2.7.2.1 h.o -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o
ford@alpha2> ./ld-new -m elf64alpha -G 8 -O1 -dynamic-linker /lib/ld.so.1 -o a.out.ld-new /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib/gcc-lib/alpha-linux/2.7.2.1 h.o -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o
ford@alpha2> ./a.out.ld
Hello world
ford@alpha2> ./a.out.ld-new
Segmentation fault (core dumped)
ford@alpha2> size a.out.*
text data bss dec hex filename
544 1957 0 2501 9c5 a.out.ld
544 1501 0 2045 7fd a.out.ld-new
ford@alpha2> exit
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ld from binutils 2.9.1 dynamic output dumps core on Linux/Alpha
1998-05-23 22:23 ld from binutils 2.9.1 dynamic output dumps core on Linux/Alpha Mike "Ford" Ditto
@ 1998-05-24 18:40 ` Christoph Zens
1998-05-25 18:15 ` Jeff Sturm
1998-05-26 16:34 ` Richard Henderson
1 sibling, 1 reply; 7+ messages in thread
From: Christoph Zens @ 1998-05-24 18:40 UTC (permalink / raw)
To: axp-list; +Cc: bug-gnu-utils
> I am trying to build binutils 2.9.1 under RedHat Linux 4.1 for alpha,
> using the stock gcc 2.7.2.1.
> The ld program is built sucessfully and when it is run it creates
> object files with apparent success, but the programs don't run, they
> dump core immediately. If the program is statically linked (gcc
> -static) then it works, but dynamically linked programs created by
> 2.9.1 ld dump core.
I am seeing the same thing here (alpha-linux-gnulibc1)...
Perhaps it has something to do with the old libc ?
--
_
_ //
\X/ Christoph Zens <e9126506@student.tuwien.ac.at>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ld from binutils 2.9.1 dynamic output dumps core on Linux/Alpha
1998-05-24 18:40 ` Christoph Zens
@ 1998-05-25 18:15 ` Jeff Sturm
1998-05-25 19:20 ` Jeff Sturm
1998-05-26 16:41 ` Richard Henderson
0 siblings, 2 replies; 7+ messages in thread
From: Jeff Sturm @ 1998-05-25 18:15 UTC (permalink / raw)
To: Christoph Zens; +Cc: axp-list
On Sun, 24 May 1998, Christoph Zens wrote:
>
> > I am trying to build binutils 2.9.1 under RedHat Linux 4.1 for alpha,
> > using the stock gcc 2.7.2.1.
>
> > The ld program is built sucessfully and when it is run it creates
> > object files with apparent success, but the programs don't run, they
> > dump core immediately. If the program is statically linked (gcc
> > -static) then it works, but dynamically linked programs created by
> > 2.9.1 ld dump core.
>
> I am seeing the same thing here (alpha-linux-gnulibc1)...
> Perhaps it has something to do with the old libc ?
I wondered that myself. I have RH 4.2 running, and tried to install a
new gcc, binutils and glibc to an alternate directory. I have tried gcc
2.7.2.1 and 2.8.1, binutils 2.8.1 and 2.9.1, and glibc 2.0.6. Every
combination yields dynamic executables that won't run (static ones do run).
They always jump to an illegal address and dump core.
I'm at the point of thinking something is just wrong with ld.so but
haven't debugged it much yet... I'm learning more about elf than I wanted
too :(
If anyone has an idea what is going on I could really use a clue... I had
the idea that the GNU stuff will build out of the box more-or-less (like it
did on Intel). I haven't tried the RedHat SRPMS. Anyone know if they
are patched?
jeff
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ld from binutils 2.9.1 dynamic output dumps core on Linux/Alpha
1998-05-25 18:15 ` Jeff Sturm
@ 1998-05-25 19:20 ` Jeff Sturm
1998-05-26 16:41 ` Richard Henderson
1 sibling, 0 replies; 7+ messages in thread
From: Jeff Sturm @ 1998-05-25 19:20 UTC (permalink / raw)
To: axp-list
I just realized that ld-2.0.5.so from RH 5.0 solves the problem. Eventually
I'll get the libc SRPM to see how it differs from GNU.
jeff
On Mon, 25 May 1998, Jeff Sturm wrote:
>
> On Sun, 24 May 1998, Christoph Zens wrote:
> >
> > > I am trying to build binutils 2.9.1 under RedHat Linux 4.1 for alpha,
> > > using the stock gcc 2.7.2.1.
> >
> > > The ld program is built sucessfully and when it is run it creates
> > > object files with apparent success, but the programs don't run, they
> > > dump core immediately. If the program is statically linked (gcc
> > > -static) then it works, but dynamically linked programs created by
> > > 2.9.1 ld dump core.
> >
> > I am seeing the same thing here (alpha-linux-gnulibc1)...
> > Perhaps it has something to do with the old libc ?
>
> I wondered that myself. I have RH 4.2 running, and tried to install a
> new gcc, binutils and glibc to an alternate directory. I have tried gcc
> 2.7.2.1 and 2.8.1, binutils 2.8.1 and 2.9.1, and glibc 2.0.6. Every
> combination yields dynamic executables that won't run (static ones do run).
> They always jump to an illegal address and dump core.
>
> I'm at the point of thinking something is just wrong with ld.so but
> haven't debugged it much yet... I'm learning more about elf than I wanted
> too :(
>
> If anyone has an idea what is going on I could really use a clue... I had
> the idea that the GNU stuff will build out of the box more-or-less (like it
> did on Intel). I haven't tried the RedHat SRPMS. Anyone know if they
> are patched?
>
> jeff
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ld from binutils 2.9.1 dynamic output dumps core on Linux/Alpha
1998-05-23 22:23 ld from binutils 2.9.1 dynamic output dumps core on Linux/Alpha Mike "Ford" Ditto
1998-05-24 18:40 ` Christoph Zens
@ 1998-05-26 16:34 ` Richard Henderson
1 sibling, 0 replies; 7+ messages in thread
From: Richard Henderson @ 1998-05-26 16:34 UTC (permalink / raw)
To: axp-list, bug-gnu-utils
On Sat, May 23, 1998 at 03:23:06PM -0700, Mike "Ford" Ditto wrote:
> I am trying to build binutils 2.9.1 under RedHat Linux 4.1 for alpha,
> using the stock gcc 2.7.2.1.
Won't work unless you rebuild all your libraries. There was a serious
bug in the assembler up through binutils 2.7.0.9, hidden by another bug
in the linker.
Red Hat decided to stay with 2.7.0.2 through RH 4.2 for this very reason.
RH 5.0, along with moving to glibc 2.0.5, upgraded binutils to 2.8.0.1,
which has the problem fixed.
r~
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ld from binutils 2.9.1 dynamic output dumps core on Linux/Alpha
1998-05-25 18:15 ` Jeff Sturm
1998-05-25 19:20 ` Jeff Sturm
@ 1998-05-26 16:41 ` Richard Henderson
1998-05-26 19:37 ` Jeff Sturm
1 sibling, 1 reply; 7+ messages in thread
From: Richard Henderson @ 1998-05-26 16:41 UTC (permalink / raw)
To: axp-list, Christoph Zens
On Mon, May 25, 1998 at 02:15:56PM -0400, Jeff Sturm wrote:
> If anyone has an idea what is going on I could really use a clue... I had
> the idea that the GNU stuff will build out of the box more-or-less (like it
> did on Intel).
They will build out of the box. But to work around a binutils 2.7.0.2
assembler bug, you must upgrade them all simultaneously. And since I'll
warrant you didn't do a complete three stage bootstrap of all of those
packages, a simultaneous upgrade was not what you were doing.
Months and months ago I posted, several times, complete instructions
for performing this bootstrap. You may check this archives if you like,
but I would up just telling folks to upgrade their distribution. It is
easier.
r~
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ld from binutils 2.9.1 dynamic output dumps core on Linux/Alpha
1998-05-26 16:41 ` Richard Henderson
@ 1998-05-26 19:37 ` Jeff Sturm
0 siblings, 0 replies; 7+ messages in thread
From: Jeff Sturm @ 1998-05-26 19:37 UTC (permalink / raw)
To: Richard Henderson; +Cc: axp-list
On Tue, 26 May 1998, Richard Henderson wrote:
> On Mon, May 25, 1998 at 02:15:56PM -0400, Jeff Sturm wrote:
> > If anyone has an idea what is going on I could really use a clue... I had
> > the idea that the GNU stuff will build out of the box more-or-less (like it
> > did on Intel).
>
> They will build out of the box. But to work around a binutils 2.7.0.2
> assembler bug, you must upgrade them all simultaneously. And since I'll
> warrant you didn't do a complete three stage bootstrap of all of those
> packages, a simultaneous upgrade was not what you were doing.
I sure tried. I built gcc-2.8.1 and binutils-2.8.1 first, then attempted
a bootstrap build of glibc-2.0.6 under the new gcc and binutils. The
dynamic linker eventually failed when it reached rpcgen.
I may have done something wrong... but once I plugged in ld-2.0.5.so
from Redhat the build completed successfully, and I was able to rebuild
gcc and binutils against the new libc. Everything but ld.so worked as-is.
> Months and months ago I posted, several times, complete instructions
> for performing this bootstrap. You may check this archives if you like,
> but I would up just telling folks to upgrade their distribution. It is
> easier.
Sorry. I didn't know about your post, and didn't find it during a quick
scan of the archives. I sort of know what I'm doing, but may have missed
a step.
Moving to RH 5.0 is one way to go, but for now I need to support both
RH 4.2 and new glibc binaries. If I am not mistaken the library names
collide, so I must create a new root for the glibc 2.0.x libraries and
set LD_LIBRARY_PATH accordingly.
Besides, I wanted BWX enabled in the tools. I was astonished at how much
BWX reduced the size of the executables.
Jeff
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~1998-05-26 19:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-05-23 22:23 ld from binutils 2.9.1 dynamic output dumps core on Linux/Alpha Mike "Ford" Ditto
1998-05-24 18:40 ` Christoph Zens
1998-05-25 18:15 ` Jeff Sturm
1998-05-25 19:20 ` Jeff Sturm
1998-05-26 16:41 ` Richard Henderson
1998-05-26 19:37 ` Jeff Sturm
1998-05-26 16:34 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox