summaryrefslogtreecommitdiff
path: root/gcc/config/alpha/elf.h
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-28 16:56:24 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-28 16:56:24 +0000
commit913fc649340a7c990e0bccc8481a8f2f23d8573b (patch)
tree10767390e01e8bea2b667f54db2e71d1f38fce40 /gcc/config/alpha/elf.h
parent80962ae714d8152ae4f6f48abe05ed4d9710d5eb (diff)
downloadgcc-913fc649340a7c990e0bccc8481a8f2f23d8573b.tar.gz
* config/alpha/elf.h (ASM_DECLARE_OBJECT_NAME): Use gnu_unique_object
type if available. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158834 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/alpha/elf.h')
-rw-r--r--gcc/config/alpha/elf.h42
1 files changed, 29 insertions, 13 deletions
diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h
index 24ab5f66b8c..d2bf732543d 100644
--- a/gcc/config/alpha/elf.h
+++ b/gcc/config/alpha/elf.h
@@ -272,20 +272,36 @@ do { \
/* Write the extra assembler code needed to declare an object properly. */
+#ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
+#define USE_GNU_UNIQUE_OBJECT 1
+#else
+#define USE_GNU_UNIQUE_OBJECT 0
+#endif
+
#undef ASM_DECLARE_OBJECT_NAME
-#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
- do { \
- HOST_WIDE_INT size; \
- ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
- size_directive_output = 0; \
- if (!flag_inhibit_size_directive \
- && DECL_SIZE (DECL) \
- && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \
- { \
- size_directive_output = 1; \
- ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \
- } \
- ASM_OUTPUT_LABEL(FILE, NAME); \
+#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
+ do { \
+ HOST_WIDE_INT size; \
+ \
+ /* For template static data member instantiations or \
+ inline fn local statics, use gnu_unique_object so that \
+ they will be combined even under RTLD_LOCAL. */ \
+ if (USE_GNU_UNIQUE_OBJECT \
+ && !DECL_ARTIFICIAL (DECL) && DECL_ONE_ONLY (DECL)) \
+ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "gnu_unique_object"); \
+ else \
+ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
+ \
+ size_directive_output = 0; \
+ if (!flag_inhibit_size_directive \
+ && (DECL) && DECL_SIZE (DECL)) \
+ { \
+ size_directive_output = 1; \
+ size = int_size_in_bytes (TREE_TYPE (DECL)); \
+ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \
+ } \
+ \
+ ASM_OUTPUT_LABEL (FILE, NAME); \
} while (0)
/* Output the size directive for a decl in rest_of_decl_compilation