This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/16899] New: Gcj does not produce working executables for big endian ARMs
- From: "jari dot korva at iki dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 6 Aug 2004 14:43:31 -0000
- Subject: [Bug java/16899] New: Gcj does not produce working executables for big endian ARMs
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
HelloWorld application compiled with gcj segfaults on armv5b-softfloat-linux
architecture (i.e. XScale IXP 422).
gdb output:
Program received signal SIGSEGV, Segmentation fault.
0x0001de4c in _Jv_FindClass (name=0x2a6820, loader=0x0)
at
/wrk/arm-linux/crosstool-0.28-rc31/build/armv5b-softfloat-linux/gcc-3.4.0-glibc-2.3.2/gcc-3.4.0/libjava/java/lang/natClassLoader.cc:507
507 klass = sys->loadClass (sname, false);
strace output:
open("/lib/ld-linux.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\2\1a\0\0\0\0\0\0\0\0\0\3\0(\0\0\0\1\0\0\35\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=93428, ...}) = 0
brk(0x2d9000) = 0x2d9000
brk(0x2da000) = 0x2da000
old_mmap(NULL, 124772, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4012f000
mprotect(0x40145000, 34660, PROT_NONE) = 0
old_mmap(0x40147000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x10000) = 0x40147000
old_mmap(0x4014d000, 1892, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4014d000
close(3) = 0
mprotect(0x4012f000, 90112, PROT_READ|PROT_WRITE) = 0
mprotect(0x4012f000, 90112, PROT_READ|PROT_EXEC) = 0
mprotect(0x40011000, 1101824, PROT_READ|PROT_WRITE) = 0
mprotect(0x40011000, 1101824, PROT_READ|PROT_EXEC) = 0
mprotect(0x40000000, 36864, PROT_READ|PROT_WRITE) = 0
mprotect(0x40000000, 36864, PROT_READ|PROT_EXEC) = 0
brk(0) = 0x2da000
brk(0x2da180) = 0x2da180
brk(0) = 0x2da180
brk(0x2db000) = 0x2db000
open("/etc/passwd", O_RDONLY) = 3
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=972, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4014e000
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 972
close(3) = 0
munmap(0x4014e000, 4096) = 0
getcwd("/wrk/java-test", 250) = 26
open("/lib/", O_RDONLY) = 3
read(3, 0xbffff150, 1024) = -1 EISDIR (Is a directory)
close(3) = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(3, 0), ...}) = 0
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/usr/lib/gconv/gconv-modules", O_RDONLY) = -1 ENOENT (No such file or
directory)
brk(0) = 0x2db000
brk(0x2e3000) = 0x2e3000
brk(0) = 0x2e3000
brk(0x2e4000) = 0x2e4000
brk(0) = 0x2e4000
brk(0) = 0x2e4000
brk(0x2f4000) = 0x2f4000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
The application was compiled with:
% armv5b-softfloat-linux-gcj -v
Reading specs from /cross/lib/gcc/armv5b-softfloat-linux/3.4.0/specs
Reading specs from
/cross/lib/gcc/armv5b-softfloat-linux/3.4.0/../../../../armv5b-softfloat-linux/lib/libgcj.spec
rename spec lib to liborig
Configured with:
/wrk/arm-linux/crosstool-0.28-rc31/build/armv5b-softfloat-linux/gcc-3.4.0-glibc-2.3.2/gcc-3.4.0/configure
--target=armv5b-softfloat-linux --host=i686-host_pc-linux-gnu
--prefix=/tmp/cross --with-float=soft --with-cpu=xscale
--enable-cxx-flags=-mcpu=xscale
--with-headers=/tmp/cross/armv5b-softfloat-linux/include
--with-local-prefix=/tmp/cross/armv5b-softfloat-linux --disable-nls
--enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit
--enable-languages=c,c++,java --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.4.0
... and executed on a:
# uname -a
Linux 2.4.18_mvl30-ixdp425 #605 Thu Apr 15 17:36:30 CST 2004 armv5teb unknown
--
Summary: Gcj does not produce working executables for big endian
ARMs
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jari dot korva at iki dot fi
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
GCC build triplet: i686-linux
GCC host triplet: armv5b-softfloat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16899