This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Don't use weak linkage for symbols in COMDAT groups [csl-arm-branch]
- From: Julian Brown <julian at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: julian at codesourcery dot com
- Date: Thu, 24 Feb 2005 23:09:25 +0000
- Subject: [PATCH] Don't use weak linkage for symbols in COMDAT groups [csl-arm-branch]
Hi,
This patch stops entities with vague linkage from being declared as ELF
weak symbols when HAVE_GAS_COMDAT_GROUP is true. This is mainly
cosmetic, but could lead to subtle interoperability problems.
Tested with cross to arm-none-eabi.
OK to apply?
ChangeLog:
* config/arm/arm.h (MAKE_DECL_ONE_ONLY): New macro. Stops
DECL_WEAK being used for symbols with vague linkage when
HAVE_GAS_COMDAT_GROUP is true.
--
Julian Brown
CodeSourcery, LLC
Index: gcc/config/arm/arm.h
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/gcc/config/arm/arm.h,v
retrieving revision 1.210.2.53
diff -c -p -r1.210.2.53 arm.h
*** gcc/config/arm/arm.h 27 Jan 2005 21:35:33 -0000 1.210.2.53
--- gcc/config/arm/arm.h 24 Feb 2005 23:04:04 -0000
*************** extern int making_const_table;
*** 2458,2463 ****
--- 2458,2475 ----
/* The arm5 clz instruction returns 32. */
#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1)
+ /* Don't use weak for entities with vague linkage when HAVE_GAS_COMDAT_GROUP
+ is true. */
+ #undef MAKE_DECL_ONE_ONLY
+ #define MAKE_DECL_ONE_ONLY(DECL) \
+ do \
+ { \
+ if (!HAVE_GAS_COMDAT_GROUP) \
+ DECL_WEAK(DECL) = 1; \
+ } \
+ while (0)
+
+
#undef ASM_APP_OFF
#define ASM_APP_OFF (TARGET_THUMB ? "\t.code\t16\n" : "")