------- Comment #12 from hubicka at ucw dot cz 2010-08-24 15:04 ------- Subject: Re: m32 lto produces non-relocatable subtraction expression errors
Hmm, actually the symbol is not changed, since it is externally visible symbol. I guess the problem would be that the symbol is used by 2 units, so both of them gets the declaration, but both of them gets the declaration with initializer (not extern). To avoid duplicate definitions, varpool.c is testing in_other_partition and prevents calling assemble_variable on them. This works just fine on ELF since extern vars don't need to be announced. Here we apparently need to get it assembled, but it is not getting via assemble_external. Rebuilding the decl to DECL_EXTERN is probably possible, but somewhat hackish. Honza -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44812