This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

why does .jcr work?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]