cannot build mainline GCC with mainline binutils

Ian Lance Taylor ian@wasabisystems.com
Tue Nov 30 05:42:00 GMT 2004


Bob Wilson <bwilson@tensilica.com> writes:

> 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.

You should only get that error if the symbols are, in fact, in
different sections.

> * Perhaps GCC ought to be emitting .pushsection/.popsection around the
> data in the middle of the function.  I tried that out (by hand-editing
> the assembly source) and it does indeed solve the problem.

The compiler does need to ensure that the start of the function and
the .size directive are in the same section.  If that does not happen,
there is a bug somewhere.

Ian



More information about the Binutils mailing list