https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68178

--- Comment #7 from Rich Felker <bugdal at aerifal dot cx> ---
I agree that the PC-relative relocation in the literal pool is acceptable and
what the compiler should be doing. However, the form of the expression the
compiler puts in the assembly output does not actually generate a relocation;
instead it generates a 'fixup' that the assembler resolves before generating
the output object file.

I claim it's wrong for the assembler to do this, but Alan Modra claims it's
right in comment 8 on binutils bug 18561. I believe a variant of Nick Clifton's
patch (from comment 6) that applies to all targets should be applied,
eliminating consideration of the 'strict' option to S_FORCE_RELOC for weak
definitions since this 'optimization' is always wrong for weak defs. Possibly
the whole 'strict' argument should be removed; the other cases where it's used
may be wrong too.

Reply via email to