Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: ford@omnicron.com (Mike "Ford" Ditto)
To: bug-gnu-utils@gnu.org, axp-list@redhat.com
Subject: ld from binutils 2.9.1 dynamic output dumps core on Linux/Alpha
Date: Sat, 23 May 98 15:23:06 -0700	[thread overview]
Message-ID: <35674C4A.0983@yoda.omnicron.com> (raw)

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


             reply	other threads:[~1998-05-23 22:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-23 22:23 Mike "Ford" Ditto [this message]
1998-05-24 18:40 ` ld from binutils 2.9.1 dynamic output dumps core on Linux/Alpha 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
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox