This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Completed Plan for --gc-sections on gcj [IGNORE my previous posts]
Adam Megacz <gcj@lists.megacz.com> writes:
> One more tweak -- I just realized that COFF limits section names to 8
> characters. The .jmd<classname> and .otable<classname> sections can
> just be .jmd and .otable -- it doesn't matter if all the otables for
> all the classes get smashed together so long as they are kept in the
> right order.
Scratch that again, somehow -ffunction-sections seems to be able to
generate section names of arbitrary length even on mingw32:
megacz@curry$/usr/local/gcc/bin/i686-pc-mingw32-objdump -h test1.o
test1.o: file format pe-i386
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 000000a0 00000000 00000000 000001a4 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000120 00000000 00000000 00000244 2**4
CONTENTS, ALLOC, LOAD, RELOC, DATA
2 .bss 00000000 00000000 00000000 00000000 2**4
ALLOC
3 .stab 0000021c 00000000 00000000 00000364 2**2
CONTENTS, RELOC, READONLY, DEBUGGING
4 .stabstr 00000a71 00000000 00000000 00000580 2**0
CONTENTS, READONLY, DEBUGGING
5 .text$_ZN5test14mainEP6JArrayIPN4java4lang6StringEE 000000d8 00000000 00000000 00000ff1 2**2
CONTENTS, ALLOC, LOAD, RELOC, CODE
6 .text$_ZN5test139mainawgwaegawegwaegawegawegwaegawegwaegEv 00000014 00000000 00000000 000010c9 2**2
CONTENTS, ALLOC, LOAD, RELOC, CODE
7 .text$_ZN5test1C1Ev 00000014 00000000 00000000 000010dd 2**2
CONTENTS, ALLOC, LOAD, RELOC, CODE
8 .text$_GLOBAL__I__ZN5test14mainEP6JArrayIPN4java4lang6StringEE 00000014 00000000 00000000 000010f1 2**2
CONTENTS, ALLOC, LOAD, RELOC, CODE
9 .ctors 00000004 00000000 00000000 00001105 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
Still, I think just using plain ".jmd" and ".otable" is a good idea;
no need to clutter the section table.
- a
--
Microsoft follows standards the same way fish follow migrating caribou.