===================================================================
@@ -1488,4 +1488,23 @@ see the files COPYING3 and COPYING.RUNTI
#endif /* GCC_INSN_FLAGS_H */
+/* UPC section names. */
+
+/* Name of section used to assign addresses to shared data items. */
+#ifndef UPC_SHARED_SECTION_NAME
+#define UPC_SHARED_SECTION_NAME "upc_shared"
+#endif
+
+/* Name of section used to hold info. describing how
+ a UPC source file was compiled. */
+#ifndef UPC_PGM_INFO_SECTION_NAME
+#define UPC_PGM_INFO_SECTION_NAME "upc_pgm_info"
+#endif
+
+/* Name of section that holds an array of addresses that points to
+ the UPC initialization routines. */
+#ifndef UPC_INIT_ARRAY_SECTION_NAME
+#define UPC_INIT_ARRAY_SECTION_NAME "upc_init_array"
+#endif
+
#endif /* ! GCC_DEFAULTS_H */
===================================================================
@@ -5496,6 +5496,41 @@ DEFHOOK
HOOK_VECTOR_END (cxx)
+/* Functions and data for UPC support. */
+#undef HOOK_PREFIX
+#define HOOK_PREFIX "TARGET_UPC_"
+HOOK_VECTOR (TARGET_UPC, upc)
+
+DEFHOOK
+(link_script_p,
+"This hook returns true if a linker script will be used to\
+ origin the UPC shared section at 0.",
+ bool, (void),
+ default_upc_link_script_p)
+
+DEFHOOK
+(shared_section_name,
+"This hook returns the name of the section used to assign addresses to\
+ UPC shared data items.",
+ const char *, (void),
+ default_upc_shared_section_name)
+
+DEFHOOK
+(pgm_info_section_name,
+"This hook returns the name of the section used to hold information\
+ describing how a UPC source file was compiled.",
+ const char *, (void),
+ default_upc_pgm_info_section_name)
+
+DEFHOOK
+(init_array_section_name,
+"This hook returns the name of the section used to hold an array\
+ of addresses of UPC initialization routines.",
+ const char *, (void),
+ default_upc_init_array_section_name)
+
+HOOK_VECTOR_END (upc)
+
/* Functions and data for emulated TLS support. */
#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_EMUTLS_"
===================================================================
@@ -1955,4 +1955,32 @@ can_use_doloop_if_innermost (const wides
return loop_depth == 1;
}
+bool
+default_upc_link_script_p (void)
+{
+#ifdef HAVE_UPC_LINK_SCRIPT
+ return true;
+#else
+ return false;
+#endif
+}
+
+const char *
+default_upc_shared_section_name (void)
+{
+ return UPC_SHARED_SECTION_NAME;
+}
+
+const char *
+default_upc_pgm_info_section_name (void)
+{
+ return UPC_PGM_INFO_SECTION_NAME;
+}
+
+const char *
+default_upc_init_array_section_name (void)
+{
+ return UPC_INIT_ARRAY_SECTION_NAME;
+}
+
#include "gt-targhooks.h"
===================================================================
@@ -250,4 +250,9 @@ extern void default_setup_incoming_varar
tree type ATTRIBUTE_UNUSED,
int *pretend_arg_size ATTRIBUTE_UNUSED,
int second_time ATTRIBUTE_UNUSED);
+extern bool default_upc_link_script_p (void);
+extern const char *default_upc_shared_section_name (void);
+extern const char *default_upc_pgm_info_section_name (void);
+extern const char *default_upc_init_array_section_name (void);
+
#endif /* GCC_TARGHOOKS_H */