Article View: gnu.gcc.help
Article #42904Segmentation faults GCC images on UW2.01 target
From: dinnisse
Date: Mon, 16 Oct 1995 00:00
Date: Mon, 16 Oct 1995 00:00
104 lines
5673 bytes
5673 bytes
Hello,
We have problems running images produced with GNU GCC on an UnixWare 2.01
system.
The target for our software was a system (Digital 486-66 12Mb) running
UnixWare PE v 1.1.2. We produce our software on a HPUX-9000 system using
the GNU cross compiler v2.7.0 (with the UnixWare 1.1 headers/libraries).
The images produced by GNU are running without problems on UW PE 1.1.2
Now we want to use the same images on an UnixWare PE 2.01 system. But most
of the images exit with segmentation faults on UW 2.01. Images produced
with GNU and UW2.01 headers/libraries also exit with segmentation faults.
(images produced on an UW1/2 Application Server PC are working fine but we
want to use the GNU development environment !).
The segmentation faults show up for different images on different places in
the code, sometimes even before the first line of code is executed!
(after the shared libraries are opened). I have some 'truss' output appended.
Can somebody tell me whether the segmentation faults are caused by the
gnu-compiler/linker or something in the UW2.01 environment. When Novell
pretends that software running on UW1.1 also runs on UW2, why not our
software? When somebody has a solution for these segmentation faults I am
very pleased to here from you.
Rob Dinnissen.
.++++++++++++++++++++++++++++++++++.++++++++++++++++++++++++++++++++++++.
| Rob Dinnissen | Philips Communication Systems |
| dinnisse@bcs22.bcs.cs.philips.com| P.O.box 32, |
| | 1200 JD Hilversum, The Netherlands |
| tel. +31 (0)35-689 3261 | fax. +31 (0)35-689 3341 |
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
truss output:
execve("./router", 0x08047D40, 0x08047D48) argc = 1
open("/usr/lib/libnsl.so.1", O_RDONLY, 0) = 3
fxstat(2, 3, 0x7FFFFAC4) = 0
mmap(0x00000000, 4096, PROT_READ, MAP_SHARED, 3, 0) = 0xBFF9F000
mmap(0x00000000, 247524, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xBFF61000
mmap(0xBFF9A000, 5980, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 229376) = 0xBFF9A000
open("/dev/zero", O_RDONLY, 027777756024) = 4
mmap(0xBFF9C000, 5860, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0xBFF9C000
close(3) = 0
munmap(0xBFF9F000, 4096) = 0
open("/usr/lib/libsocket.so.1", O_RDONLY, 0) = 3
fxstat(2, 3, 0x7FFFFAC4) = 0
mmap(0x00000000, 4096, PROT_READ, MAP_SHARED, 3, 0) = 0xBFF9F000
mmap(0x00000000, 79164, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xBFF4C000
mmap(0xBFF5C000, 8260, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 61440) = 0xBFF5C000
mmap(0xBFF5F000, 1340, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0xBFF5F000
close(3) = 0
munmap(0xBFF9F000, 4096) = 0
open("/usr/lib/libresolv.so.1", O_RDONLY, 0) = 3
fxstat(2, 3, 0x7FFFFAC4) = 0
mmap(0x00000000, 4096, PROT_READ, MAP_SHARED, 3, 0) = 0xBFF9F000
mmap(0x00000000, 31216, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xBFF43000
mmap(0xBFF49000, 3760, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 20480) = 0xBFF49000
mmap(0xBFF4A000, 2544, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0xBFF4A000
close(3) = 0
munmap(0xBFF9F000, 4096) = 0
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE, 4, 0) = 0xBFF9F000
open("/usr/lib/libnsl.so.1", O_RDONLY, 0) = 3
fxstat(2, 3, 0x7FFFFAC4) = 0
close(3) = 0
open("/usr/lib/libsocket.so.1", O_RDONLY, 0) = 3
fxstat(2, 3, 0x7FFFFAC4) = 0
close(3) = 0
open("/usr/lib/libnsl.so.1", O_RDONLY, 0) = 3
fxstat(2, 3, 0x7FFFFAC4) = 0
close(3) = 0
close(4) = 0
getuid() = 0 [ 0 ]
getgid() = 3 [ 3 ]
setgid(3) = 0
setuid(0) = 0
brk(0x08011FA9) = 0
Incurred fault #5, FLTACCESS %pc = 0xBFFC261D
siginfo: SIGSEGV SEGV_ACCERR addr=0x00000000
Received signal #11, SIGSEGV [default]
siginfo: SIGSEGV SEGV_ACCERR addr=0x00000000
*** process killed ***
Sample compile command:
/pdtools/gcc/lib/gcc-lib/i386-unixware2-sysv4/2.7.0/cpp -lang-c -v -undef
-D__GNUC__=2 -D__GNUC_MINOR__=7 -Di386 -Dunix -D__svr4__ -D__i386__
-D__unix__ -D__svr4__ -D__i386 -D__unix -Asystem(unix) -Asystem(svr4)
-Acpu(i386) -Amachine(i386) -D__OPTIMIZE__ yident.c /usr/tmp/cca22501.i
Sample link command:
/pdtools/gcc/i386-unixware2-sysv4/bin/ld -V -YP,/pdtools/gcc/i386-unixware2-sysv4/lib
-Qy -o ../bin/router -s /pdtools/gcc/i386-unixware2-sysv4/lib/crt1.o
/pdtools/gcc/i386-unixware2-sysv4/lib/crti.o /pdtools/gcc/i386-unixware2-sysv4/lib/values-Xa.o
/pdtools/gcc/lib/gcc-lib/i386-unixware2-sysv4/2.7.0/crtbegin.o
-L/pdtools/gcc/lib/gcc-lib/i386-unixware2-sysv4/2.7.0 -L/pdtools/gcc/i386-unixware2-sysv4/lib
-M /usr/tmp/cca225011.o h29550s0.o h29550s1.o h29550s2.o dbug.a tmsap.a tmsdb.a tms.a tmsg.a
dbug.a tmsap.a tmsdb.a tms.a tmsg.a -lnsl -lsocket -lcurses -lresolv -lgcc -lc -lgcc
/pdtools/gcc/lib/gcc-lib/i386-unixware2-sysv4/2.7.0/crtend.o
/pdtools/gcc/i386-unixware2-sysv4/lib/crtn.o
Technical Details
Message-ID:
<45tcbt$4f0@bcs21.bcs.cs.philips.com>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,132d96ae21ef0460,start X-Google-Attributes: gid11318c,public X-Google-Thread: 10663e,132d96ae21ef0460,start X-Google-Attributes: gid10663e,public From: dinnisse@bcs21.bcs.cs.philips.com () Subject: Segmentation faults GCC images on UW2.01 target Date: 1995/10/16 Message-ID: <45tcbt$4f0@bcs21.bcs.cs.philips.com> X-Deja-AN: 117629789 organization: Philips Business Communication Systems newsgroups: gnu.gcc.help,comp.unix.unixware.misc originator: koef@bcs21.bcs.cs.philips.com