From 2cee371fc4ff421e7ee390cec4b7f3b2cfa2a0f1 Mon Sep 17 00:00:00 2001 From: green Date: Wed, 8 Aug 2001 23:33:51 +0000 Subject: 2001-08-08 Anthony Green * java/class.c (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44731 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/defaults.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/defaults.h') diff --git a/gcc/defaults.h b/gcc/defaults.h index 20729249dcf..0939d077d63 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -217,6 +217,15 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0) #endif #endif +/* If we have named section and we support weak symbols, then use the + .jcr section for recording java classes which need to be registered + at program start-up time. */ +#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK +#ifndef JCR_SECTION_NAME +#define JCR_SECTION_NAME ".jcr" +#endif +#endif + /* If we have no definition for UNIQUE_SECTION, but do have the ability to generate arbitrary sections, construct something reasonable. */ -- cgit v1.2.1