This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

IA64 HP-UX patch (ASM_OUTPUT_EXTERNAL_LIBCALL)


The default ASM_OUTPUT_EXTERNAL_LIBCALL puts out a global statement for
library calls but does not put out the function type information that
the HP linker needs for calls to shared libraries.  This patch defines
ASM_OUTPUT_EXTERNAL_LIBCALL in order to globalize the label and put out
the needed type information.

2002-09-25  Steve Ellcey  <sje@cup.hp.com>

	* config/ia64/hpux.h (ASM_OUTPUT_EXTERNAL_LIBCALL): New


*** gcc.orig/gcc/config/ia64/hpux.h	Wed Sep 25 11:21:43 2002
--- gcc/gcc/config/ia64/hpux.h	Wed Sep 25 11:22:12 2002
*************** do {							\
*** 115,120 ****
--- 115,135 ----
     structure handling, this macro simply ensures that single field
     structures are always treated like structures.  */
  
+ /* ASM_OUTPUT_EXTERNAL_LIBCALL defaults to just a globalize_label call,
+    but that doesn't put out the @function type information which causes
+    shared library problems.  */
+ 
+ #undef ASM_OUTPUT_EXTERNAL_LIBCALL
+ #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)			\
+ do {								\
+   (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0));	\
+   fprintf (FILE, "%s", TYPE_ASM_OP);				\
+   assemble_name (FILE, XSTR (FUN, 0));				\
+   putc (',', FILE);						\
+   fprintf (FILE, TYPE_OPERAND_FMT, "function");			\
+   putc ('\n', FILE);						\
+ } while (0)
+ 
  #define MEMBER_TYPE_FORCES_BLK(FIELD, MODE) 1
  
  /* Override the setting of FUNCTION_ARG_REG_LITTLE_ENDIAN in


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