ARM: assembler: use explicit relocation for ADR with a function symbol

Reimplement the 'badr' macro in a way that forces the reference to be
visible to the linker, which will then take care of setting the Thumb
bit if necessary. This is much better than using '+ 1' to set it
unconditionally, given that the Thumb disposition is not a property of
the reference but a property of the symbol. Also, '+ 1' does not do the
right thing in case the Thumb bit is already set.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
1 file changed