21888 – bootstrap failure with linker relaxation enabled (original) (raw)

Description Richard Henderson 2005-06-02 21:38:38 UTC

When bootstrapping for EV4, pp_base_set_prefix is miscompiled. An fnop is emitted between the two insns of the initial ldgp pair.

The abi for "standard pv usage", implied by ".prologue 1", requires that this instruction pair be sequential. Which allows the linker to alter "jsr foo" into "bsr foo+8".

With the additional fnop, a bsr pp_base_set_prefix+8 results in the gp being corrupted. Hilarity ensues.