This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: More questions about _GLOBAL
Adam Megacz wrote:
>What would really help me, and wouldn't have much design impact on
>gcj, is if there were a switch to create one __GLOBAL_foo per class,
>not one per compilation unit. It would be even cooler if this
>__GLOBAL_foo was named deterministically (right now the name seems to
>be the mangling of a randomly chosen method). Since there would be a
>1:1 mapping from classes to GLOBALs, the name could just be
>__GLOBAL_<mangled-class-name>.
>
>Is this an easy change or a hard one? Would anybody be kind enough to
>point me at the right part of gcc and give me a few hints? I feel
>pretty comfortable screwing with libgcj, but I've never tried to
>modify gcc before.
>
It shouldn't be too hard to change. You want to look at
emit_register_classes() in gcc/java/class.c.
regards
Bryce.