Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* GCC 2.7.2.1, binutils-2.7.0.9, glibc-2.0.2 questions
@ 1997-04-21  6:33 Terry L. Ridder
  0 siblings, 0 replies; 2+ messages in thread
From: Terry L. Ridder @ 1997-04-21  6:33 UTC (permalink / raw)


Hello Everyone; 

I am writing this using Dad's account. Dad is having surgery on his
left shoulder on Monday morning, so I am working on taking care of
his e-mail.

I had previously posted a request for help in building the latest
current compiler, and all glibc libraries awhile back. Mr. Richard
Henderson provide an excellent reply which I have been working with.

This evening (Sunday 20th April 1997) while attempting to build the
gcc-2.7.2.1 compiler is when problems started.

I was able to build glibc-2.0.2 all right. It did fail two tests.
The one test failed was tst-strtol at test 20.
I do not remember the other test.
I did install the glibc using the command 'make install'.

After running the configure command I started to build the gcc compiler
in stages. The make failed on genattr. The program genattr fails with
an unaligned trap error, immediately followed by a segmentation fault.

I decided to investigate further so with the help of my sister I wrote
a small program to try. The ELF version fails in the same way, the static
version runs fine.

Below is the program.

main()
{
    printf("hello world\n");
}

This program was built twice with the following commands.

gcc static -g3 -o pnr-static pnr.c
gcc  -g3 -o pnr-elf pnr.c

I debugged both programs with gdb. The output of the debugging session is
below.

Based on this, I went back to the gcc-2.7.2.1 directory and ran genattr
in gdb. Genattr fails at the exact same spot.

Based on this I went to the povray directory where Dad and I have been working
on debugging POV-RAY. I attempted to build povray, and make complained that
zlib, and libpng conflicted with libc.so.6.1.
I went to rebuild zlib, and the example program in zlib failed in the exact
same way as the previous programs.

According to Dad the problem is in the loader code from glibc, since
statics run ok.

He also attempted to explain that the programs are failing even before the
are beginning to execute any actual program code. He did attempt to explain
about the loader code which 'wraps' each program, that went over my head.

My questions are:

Has anyone else seen this when installing binutils-2.7.0.9, glibc-2.0.2,
and gcc-2.7.2.1?

Is there a patch to fix this problem?

<Begin GDB output>

GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (alpha-unknown-linux), Copyright 1996 Free Software Foundation, Inc...
(gdb) r
Starting program: /usr2/redhat/BUILD/./pnr-elf 
This warning occurs if you are debugging a function without any symbols
(for example, in a stripped executable).  In that case, you may wish to
increase the size of the search with the `set heuristic-fence-post' command.

Otherwise, you told GDB there was a function where there isn't one, or
(more likely) you have encountered a bug in GDB.

Program received signal SIGSEGV, Segmentation fault.
strrchr () at ../sysdeps/alpha/strrchr.S:48
Current language:  auto; currently asm
(gdb) directory /usr2/GNU.dir/glibc-2.0.2/build
Source directories searched: /usr2/GNU.dir/glibc-2.0.2/build:$cdir:$cwd
(gdb) break strrchr
Breakpoint 1 at 0x155556c6b00: file ../sysdeps/alpha/strrchr.S, line 43.
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr2/redhat/BUILD/./pnr-elf 
Temporarily disabling shared library breakpoints:
1 

Breakpoint 1, strrchr () at ../sysdeps/alpha/strrchr.S:43
43		zapnot	a1, 1, a1	# e0    : zero extend our test character
(gdb) bt
#0  strrchr () at ../sysdeps/alpha/strrchr.S:43
#1  0x1555568e9e0 in set_progname () at assert.c:68
#2  0x1555568e694 in __libc_init () at set-init.c:23
#3  0x1555568e7d0 in init () at ../sysdeps/unix/sysv/linux/init-first.c:74
(gdb) n
44		mov	zero, t6	# .. e1 : t6 is last match aligned addr
(gdb) n
45		sll	a1, 8, t5	# e0    : replicate our test character
(gdb) n
46		mov	zero, t7	# .. e1 : t7 is last match byte compare mask
(gdb) n
47		or	t5, a1, a1	# e0    :
(gdb) n
48		ldq_u   t0, 0(a0)	# .. e1 : load first quadword
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
strrchr () at ../sysdeps/alpha/strrchr.S:48
48		ldq_u   t0, 0(a0)	# .. e1 : load first quadword
(gdb) n

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) file ./pnr-static
Load new symbol table from "./pnr-static"? (y or n) y
Reading symbols from ./pnr-static...done.
(gdb) disable 1
(gdb) r
Starting program: /usr2/redhat/BUILD/./pnr-static 
hello world

Program exited with code 014.
(gdb) quit

Pieter Nicolaas Ridder
Middle School Student
"I do not write software, but I am learning."

"And every hour of every day I'm learning more
the more I learn, the less I know about before
the less I know, the more I want to look around
digging deep for clues on higher ground."
==Higher Ground== UB40

--
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] 2+ messages in thread

* Re: GCC 2.7.2.1, binutils-2.7.0.9, glibc-2.0.2 questions
       [not found] <Pine.LNX.3.91.970421010625.9849A-100000@edgar.blauedonau.com>
@ 1997-04-21  7:00 ` Steven Kokinos
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Kokinos @ 1997-04-21  7:00 UTC (permalink / raw)


> Has anyone else seen this when installing binutils-2.7.0.9, glibc-2.0.2,
> and gcc-2.7.2.1?
> 
> Is there a patch to fix this problem?
> 

Yes, I've run in to the exact same problem.  The reason the gcc compile
fails on genattr is because genattr code blows up when it tries to create
files from it.  go in to the directory and type ./genattr.  You will see a
core dump.

The problem is in binutils.  I haven't managed to compile a version, even
with Richard Henderson's patch, which doesn't blow up my system.  I've
given up for the time being until a binary distribution appears somewhere.

-Steve

--
Steven Kokinos - Web Developers Network - http://www.webdevelop.com/
steve@webdevelop.com - 60 Day free trial for developers! 
Industry leading development environment, multiple T1 network.

--
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] 2+ messages in thread

end of thread, other threads:[~1997-04-21  7:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-21  6:33 GCC 2.7.2.1, binutils-2.7.0.9, glibc-2.0.2 questions Terry L. Ridder
     [not found] <Pine.LNX.3.91.970421010625.9849A-100000@edgar.blauedonau.com>
1997-04-21  7:00 ` Steven Kokinos

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