This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
why does .jcr work?
- From: Adam Megacz <adam at megacz dot com>
- To: java at gcc dot gnu dot org
- Date: 06 Nov 2002 11:35:27 -0800
- Subject: why does .jcr work?
- Organization: Myself
Each class has a .jcr section containing its class registration. On
startup, libgcc's crtstuff.o looks for the symbol __JCR_BEGIN__ and
scans from there until __JCR_END__ to find the class registrations.
Two questions:
1. Why are all the .jcr sections guaranteed to be adjacent in the
linked binary? Does the linker guarantee alphabetical ordering, or
is ".jcr" a "magic section" that gets special treatment from the
linker?
2. Why is this in libgcc instead of simply in the constructor for some
static C++ class in libgcj?
Thanks!
- a
--
Microsoft follows standards the same way fish follow migrating caribou.