免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1345 | 回复: 0
打印 上一主题 下一主题

ARM ld:Conflicting wchar_t attributes [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-10-10 15:38 |只看该作者 |倒序浏览
一个C++的程序在连接的时候报告wchar_t类型冲突, 已经突破了我的传统观念,ld看来对类型定义也是蛮关心的.
不过参考这封邮件,应该能找到解决的办法.
http://sourceware.org/ml/binutils/2007-06/msg00279.html
Conflicting wchar_t attributes
  • From: Khem Raj
  • To: Paul Brook
  • 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
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/79526/showart_1284716.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP