Thread (18 messages) 18 messages, 4 authors, 2018-10-02

[PATCH] ARM: makefile: pass -march=armv4 to assembler even on CPU32v3

From: Jason@zx2c4.com (Jason A. Donenfeld)
Date: 2018-10-02 13:13:00
Also in: lkml

Hey Ard,

On Tue, Oct 2, 2018 at 3:10 PM Ard Biesheuvel [off-list ref] wrote:
It builds but it doesn't run, at least not when built into the kernel
proper (which will be the case after random.c moves to this library)

Your toolchain is implicitly passing --fix-v4bx to the assembler,
which causes it to permit bx instructions in ARMv4 object code, but
tag them with special R_ARM_V4BX ELF relocations. The ARM module
loader does take these into account, so built as a module, it works.
However, when built into the core kernel, we have to rely on the
linker to patch this instruction into the ARMv4 equivalent, and a
quick check reveals that that is currently not the case.

Bottom line: let's not go there.
Oh, thanks a bunch for explaining that. Since I wrote the last email
I've been playing around with as, readelf, and qemu and was slightly
mystified.
quoted
But anyway,
I'll go with your primary suggestion and we therefore can move ahead
with changing the global cflag to march=armv3m. Would you like me to
submit the patch for this, or would yo like to handle it?
Yes please go ahead.
Alright, incoming in a few minutes.

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help