This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Don't use weak linkage for symbols in COMDAT groups
Andreas Jaeger wrote:
Julian Brown <julian@codesourcery.com> writes:
Mark Mitchell wrote:
Julian Brown wrote:
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?
Is there any reason not to do this in elf.h? It doesn't seem
ARM-specific to me. Would you try making that change, and testing
on IA32 GNU/Linux as well? Does anyone see backwards compatibility
problems here?
It doesn't lead to any new regressions on HEAD for i686-pc-linux-gnu
with the alteration in config/elfos.h instead.
I propose to revert this patch since it cannot have been tested on
i686-linux-gnu with all languages, it breaks e.g. Java bootstrap.
OK, I agree and I will revert the patch immediately. Sorry for the
breakage, I will be sure to run the testsuite with all languages in the
future!
Julian
--
Julian Brown
CodeSourcery, LLC
Index: config/elfos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/elfos.h,v
retrieving revision 1.67
diff -c -p -r1.67 elfos.h
*** config/elfos.h 25 Feb 2005 22:32:56 -0000 1.67
--- config/elfos.h 28 Feb 2005 14:09:26 -0000
*************** Boston, MA 02111-1307, USA. */
*** 212,226 ****
fprintf ((FILE), "%s\n", ASM_SECTION_START_OP)
#endif
! /* Don't use weak for entities with vague linkage when HAVE_GAS_COMDAT_GROUP
! is true. */
! #define MAKE_DECL_ONE_ONLY(DECL) \
! do \
! { \
! if (!HAVE_GAS_COMDAT_GROUP) \
! DECL_WEAK(DECL) = 1; \
! } \
! while (0)
/* Switch into a generic section. */
#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
--- 212,218 ----
fprintf ((FILE), "%s\n", ASM_SECTION_START_OP)
#endif
! #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
/* Switch into a generic section. */
#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section