why does .jcr work?

Andrew Haley aph@redhat.com
Wed Nov 6 13:03:00 GMT 2002


Adam Megacz writes:
 > 
 > Andrew Haley <aph@redhat.com> writes:
 > > gcj foo.java bar.java bloop.java -Wl,--verbose
 > 
 > Oh, cool... Thanks for showing me this.
 > 
 > 
 > > .jcr : { KEEP (*(.jcr)) }
 > 
 > Okay... I also noticed that the linker script had to go out of its way
 > to ensure that crtbegin.o (__CRT_LIST__) came before .ctors, but it
 > didn't have to do the same thing for __JCR_LIST__... do you know why
 > that is the case?
I guess it's because .ctors is sorted.
 > > > 2. Why is this in libgcc instead of simply in the constructor for some
 > > > static C++ class in libgcj?
 > 
 > > What problem would that solve?
 > 
 > I dunno, more isolation. Just curious if it had to be that way. If I
 > get --gc-sections working, it would be easier if I could confine my
 > changes to libgcj and gcc/java/*.
I don't see the problem. Surely whatever you do you'll need to remove
the static constructors you don't need, and whatever you do you'll
still need __JCR_LIST__. crtbegin won't change.
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /