This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cannot build mainline GCC with mainline binutils


On Mon, Nov 29, 2004 at 05:35:29PM -0800, Wilson; Bob, Tensillca wrote:
> I discovered a problem while trying to build mainline GCC with mainline 
> binutils for an xtensa-elf target.  It looks like some of the recent comdat 
> patches require the assembler's DIFF_EXPR_OK macro to be defined.  This is 
> not true for Xtensa or MIPS.
> 
> I'm seeing the problem when building libstdc++-v3/src/locale-inst.cc.  The 
> generated assembly looks like this:
> 
> .section
>   .gnu.linkonce.t.long_mangled_name,"axG",@progbits,long_mangled_name,comdat
> long_mangled_name:
> 	....CODE....
> 
> .section
>   .gnu.linkonce.r.long_mangled_name,"aG",@progbits,long_mangled_name,comdat
> 	....DATA....
> 
> .section
>   .gnu.linkonce.t.long_mangled_name,"axG",@progbits,long_mangled_name,comdat
> long_mangled_name:
> 	....MORE CODE....
> 
> .size	long_mangled_name, .-long_mangled_name
> 
> (The "long_mangled_name" here is: 
> _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES3_S3_RSt8ios_basecRKSs.)
> 
> The problem is the ".-long_mangled_name" expression in the .size directive. 
> This does not assemble unless DIFF_EXPR_OK is defined.  (Either that or 
> something else is wrong in the Xtensa port of GAS, which is always a 
> possibility.)  The error message is: "Error: operation combines symbols in 
> different segments".  The data in the middle of the function apparently 
> makes the assembler think that "." is in a different segment than the start 
> of the function.
> 

Someone is wrong. Can you create very very small testcase in assembly?



H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]