On Fri, 2007-04-20 at 18:55 -0700, Kristis Makris wrote:
> /tmp/ccAyM42z.s: Assembler messages:
> /tmp/ccAyM42z.s:787: Error: can't resolve
> `.hcu.uncommon_code' {.hcu.uncommon_code section} - `.LFB17' {.text
> section}

You are subtracting symbols in different ELF object file sections.  This
is not an assemble time constant since we don't know where the sections
will end up in the output.  Since this value is used in a context that
requires a constant, the assembler is forced to give an error.

787 is the line number.  Look at this line and we see
        .long   .LFE17-.LFB17
Then look above for the definitions of these labels, and we see LFB17 is
at the start of main, which is in the text section, and LFE17 is at the
end of main, which is in the .hcu.uncommon_code section, which clearly
won't work.  You can't start a function in one section and end it in
another section.

It looks like you are trying to do some complicated (and probably
fragile) section switching stuff in a C function using gcc extended
asms, and that there is an unbalanced section switch somewhere.  Or
maybe gcc optimization is breaking your code.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com




_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to