Conflicting wchar_t attributes

Khem Raj kraj@mvista.com
Wed Jun 27 00:41:00 GMT 2007


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



More information about the Binutils mailing list