This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Compiling CygWin ARM GCC and GCJ cross compiler
- From: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- To: <java at gcc dot gnu dot org>
- Date: Mon, 28 Apr 2003 18:04:31 +0200
- Subject: Compiling CygWin ARM GCC and GCJ cross compiler
Its kinda embarassing to answer my own questions.
It appears I was indeed missing the --with-newlib=yes when I got
into difficulties with NO_GETUID not being defined.
I now have a arm-elf-* compiler built that I'll be investigating more tomorrow.
Initially the size seemed to be ~1.5MB for hello world, which
seems to be similar to what others reported. Any resources on
how to best configure the compiler to reduce footprint
would be welcome.
Here are my initial results:
public class Hello
{
static public void main(String[] args)
{
System.out.println("hello world!\n");
}
}
arm-elf-gcj -g -o test --main=Hello Hello.java
$ arm-elf-objdump --headers test
test: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .init 0000001c 00008000 00008000 00008000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .text 000ed654 0000801c 0000801c 0000801c 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .fini 00000018 000f5670 000f5670 000f5670 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
3 .rodata 000383c4 000f5688 000f5688 000f5688 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .data 0003ecc0 0012db4c 0012db4c 0012db4c 2**2
CONTENTS, ALLOC, LOAD, DATA
5 .eh_frame 00000004 0016c80c 0016c80c 0016c80c 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .gcc_except_table 00001dc0 0016c810 0016c810 0016c810 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .ctors 0000000c 0016e5d0 0016e5d0 0016e5d0 2**2
CONTENTS, ALLOC, LOAD, DATA
8 .dtors 00000008 0016e5dc 0016e5dc 0016e5dc 2**2
CONTENTS, ALLOC, LOAD, DATA
9 .jcr 0000081c 0016e5e4 0016e5e4 0016e5e4 2**2
CONTENTS, ALLOC, LOAD, DATA
10 .sbss 00000000 0016ee00 0016ee00 0016ee00 2**0
CONTENTS
11 .bss 0000d284 0016ee00 0016ee00 0016ee00 2**5
ALLOC
12 .comment 00006244 00000000 00000000 0016ee00 2**0
CONTENTS, READONLY
13 .debug_aranges 00004c78 00000000 00000000 00175048 2**3
CONTENTS, READONLY, DEBUGGING
14 .debug_pubnames 0003a87e 00000000 00000000 00179cc0 2**0
CONTENTS, READONLY, DEBUGGING
15 .debug_info 005d5583 00000000 00000000 001b453e 2**0
CONTENTS, READONLY, DEBUGGING
16 .debug_abbrev 0007cdab 00000000 00000000 00789ac1 2**0
CONTENTS, READONLY, DEBUGGING
17 .debug_line 0006c4bc 00000000 00000000 0080686c 2**0
CONTENTS, READONLY, DEBUGGING
18 .debug_frame 000302d0 00000000 00000000 00872d28 2**2
CONTENTS, READONLY, DEBUGGING
19 .debug_str 000a0a80 00000000 00000000 008a2ff8 2**0
CONTENTS, READONLY, DEBUGGING
20 .stack 00000000 00080000 00080000 00943a78 2**0
CONTENTS
21 .debug_ranges 0000d780 00000000 00000000 00943a78 2**0
CONTENTS, READONLY, DEBUGGING
$ arm-elf-gdb test
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or 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.
This GDB was configured as "--host=i686-pc-cygwin --target=arm-elf"...
(gdb) load
You can't do that when your target is `exec'
(gdb) target sim
Connected to the simulator.
(gdb) load
Loading section .init, size 0x1c vma 0x8000
Loading section .text, size 0xed654 vma 0x801c
Loading section .fini, size 0x18 vma 0xf5670
Loading section .rodata, size 0x383c4 vma 0xf5688
Loading section .data, size 0x3ecc0 vma 0x12db4c
Loading section .eh_frame, size 0x4 vma 0x16c80c
Loading section .gcc_except_table, size 0x1dc0 vma 0x16c810
Loading section .ctors, size 0xc vma 0x16e5d0
Loading section .dtors, size 0x8 vma 0x16e5dc
Loading section .jcr, size 0x81c vma 0x16e5e4
Start address 0x811c
Transfer rate: 11757568 bits in <1 sec.
(gdb) run
Starting program: /home/oharboe/gcc33/test/test
hello world!
Program exited normally.
[Switching to process 0]
(gdb) quit
Øyvind