Article View: gnu.gcc.help
Article #41698Problems building gcc-2.7.2 on ICL DRS/NX 7 sparc
From: Wilf Coles
Date: Mon, 26 Feb 1996 00:00
Date: Mon, 26 Feb 1996 00:00
61 lines
2743 bytes
2743 bytes
Although I have successfully compiled GCC up to version 2.6.3 on ICL
DRS/NX 7 sparc (build=sparc-unknown-sysv4), I cannot seem to do the
same on 2.7.x (I've tried them all). The build for enquire succeeds
(apparently) but running the created executable results in a
segmentation fault.
running xgcc -c on a hello.c creates a hello.o that can be linked
using the native cc to create an executable that runs ok.
I dumped the ld command line for building hello from xgcc (-v) to see
what was going on. By trial and error I found that the ld command
would create a runnable executable if I omitted the crtbegin.o and
crtend.o from the link.
If I *excluded* the crtbegin.o from the link then hello core dumps
with an illegal instruction.
If I *excluded* crtend.o from the link then hello core dumps *after*
with an illegal instruction.
If I *excluded* crtend.o from the link then hello core dumps *after*
running the program (IYSWIM), again with an illegal instruction.
This seems to me to be the wrong way round. If crtbegin.o were causing
a problem, I would expect that if I excluded it then the program might
start ok and run, but then trap when it hit the faulty crtend.o, but
it seems to be doing the reverse.
Is there a mix up between crtbegin and crtend? I dumped the symbols
from nm for crtbegin.o and crtend.o and it would seem that begin calls
destructors and end calls destructors (please see below). This does
not seem logical.
wc@vinca:/wilf/gcc-2.7.2>nm stage1/crtbegin.o
U _GLOBAL_OFFSET_TABLE_
00000000 ? __CTOR_LIST__
00000000 ? __DTOR_LIST__
00000000 t __do_global_dtors_aux
0000007c t fini_dummy
00000000 d force_to_data
00000000 t gcc2_compiled.
wc@vinca:/wilf/gcc-2.7.2>nm stage1/crtend.o
U _GLOBAL_OFFSET_TABLE_
00000000 ? __CTOR_END__
00000000 ? __DTOR_END__
00000000 t __do_global_ctors_aux
00000000 d force_to_data
00000000 t gcc2_compiled.
0000007c t init_dummy
wc@vinca:/wilf/gcc-2.7.2>stage1/enquire -f
Segmentation Fault (core dumped)
Anybody any ideas? What's my problem and how do I fix it? Why is this
different from 2.6.3 to 2.7.x?
TVMIA
Wilf Coles
c.cols@slh0613.wins.icl.co.uk
wilf@cix.compulink.co.uk
Technical Details
Message-ID:
<3131BB06.32D62718@slh0633.wins.icl.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,f08ecf4b7ae3f821,start X-Google-Attributes: gid11318c,public From: Wilf Coles <c.coles@slh0633.wins.icl.co.uk> Subject: Problems building gcc-2.7.2 on ICL DRS/NX 7 sparc Date: 1996/02/26 Message-ID: <3131BB06.32D62718@slh0633.wins.icl.co.uk> X-Deja-AN: 141179789 x-nntp-posting-host: aesltd.demon.co.uk content-type: text/plain; charset=us-ascii mime-version: 1.0 newsgroups: gnu.gcc.help x-mailer: Mozilla 2.0b6a (X11; I; Linux 1.3.35 i486)