This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Conflicting wchar_t attributes
- From: Khem Raj <kraj at mvista dot com>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 26 Jun 2007 17:41:17 -0700
- Subject: Conflicting wchar_t attributes
Hi Paul
While trying out this patch
http://gcc.gnu.org/ml/gcc-patches/2007-06/msg01500.html
The test gcc.dg/fshort-wchar.c is failing with this message from linker.
ERROR: /tmp/cc6isX9R.o: Conflicting definitions of wchar_t
This error is because the test forces to have wchar_t length of 2
but when linking it has the other objects which have wchar_t length of 4
from other objects (first one is crti.o)
ld fails now because it finds that size of wchar_t is not matching
when it opens fshort-wchar object and fails to merge the attributes
in elf32_arm_merge_eabi_attributes ()
Looking at EABI 2.0 addendum it describes this attribute under section
Procedure Call related attributes.
My question is should merging on the sizes be allowed while linking ?
As of now ld just rejects it.
Thanks for your help
-Khem