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

--- Comment #39 from Christophe Lyon <clyon at gcc dot gnu.org> ---
We have backported r227748, 229160 and 229161 to our linaro-gcc-5 branch, and
we got a bug report from the kernel team.

Indeed, when the kernel is configured with CONFIG_ARM64_ERRATUM_843419, the
support for relocations R_AARCH64_ADR_PREL_PG_HI21 and
R_AARCH64_ADR_PREL_PG_HI21_NC is removed from the kernel to avoid loading
objects with possibly offending sequences. In this case the kernel is built
with
-mcmodel=large.

With these backports, these relocations are generated again by default.

Adding -mpc-relative-literal-loads to the kernel Makefile in
arch/arm64/Makefile does fix the build, but since this option is not supported
by GCC if it does not contain these backports (and the compiler aborts with an
error), it's not obvious how to modify the Makefile to decide when to use this
option.

So, although Ramana said he would backport these to the FSF gcc-5 branch, maybe
it's safer not to.

Or change the default?

Or... change GCC's -mfix-cortex-a53-843419 to change the default for
-mpc-relative-literal-loads and add -mfix-cortex-a53-843419 to the kernel
Makefile.

Reply via email to