This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: java class registration via .jcr section, take 3
- To: green at peach dot cygnus dot co dot uk
- Subject: Re: Patch: java class registration via .jcr section, take 3
- From: Richard Henderson <rth at redhat dot com>
- Date: Wed, 8 Aug 2001 10:16:20 -0700
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- References: <200108070629.CAA30001@peach.cygnus.co.uk>
On Tue, Aug 07, 2001 at 02:29:41AM -0400, green@peach.cygnus.co.uk wrote:
> * java/class.c (jcr_section): New function.
> (emit_register_classes): Use assemble_jcr if possible. Keep the
> original mechanism as a fallback.
> * defaults.h (JCR_SECTION_NAME): Define if we have named section
> and weak symbol support.
> * crtstuff.c (__JCR_LIST__): Define.
> (__JCR_END__): Define.
> (_Jv_RegiserClasses): Define weak symbol if possible.
> (__do_global_ctors_aux): Register classes for ELF targets with
> weak symbol support.
Ok with changes:
> +static void
> +assemble_jcr (symbol)
> + rtx symbol;
You forgot to prototype this, but we'd be doing less work if
> + for ( t = registered_class; t; t = TREE_CHAIN (t))
> + assemble_jcr (XEXP (DECL_RTL (t), 0), 0);
was written as
named_section_flags (JCR_SECTION_NAME, SECTION_WRITE,
POINTER_SIZE / BITS_PER_UNIT);
for (t = registered_class; t; t = TREE_CHAIN (t))
assemble_integer (XEXP (DECL_RTL (t), 0),
POINTER_SIZE / BITS_PER_UNIT, 1);
r~