Fwd: [PATCH] arm: ensure symbol is a thumb symbol in new binutils
Nick Clifton
nickc@redhat.com
Mon Jun 11 14:03:00 GMT 2018
Hi Christophe,
> On code generated we see the issue on entry-common.o
> (arch/arm/kernel/entry-common.o):
> code ok: f2af 1e3b    subw   lr, pc, #315   ; 0x13b
> code KO: f2af 1e3a    subw   lr, pc, #314   ; 0x13a
> (see assembler code obtained by objdump)
OK - so this translates to the use of the "badr" macro defined
in include/asm/assembler.h:
.macro badr\c, rd, sym
#ifdef CONFIG_THUMB2_KERNEL
adr\c \rd, \sym + 1
#else
adr\c \rd, \sym
#endif
.endm
What is the CONFIG_THUMB2_KERNEL flag ?
I am wondering why it alters the behaviour of the badr macro...
> -fno-PIE -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp
Question - is the -mno-thumb-interwork flag always used ?
It seems to me that this flag might provide a much simpler option
to fix the assembler. Ie: if -mthumb-interwork is enabled then
the ADR pseudo-instruction should include the interworking bit (for
thumb function symbols), whereas if -mno-thumb-interwork is in
effect, then it should not.
Cheers
Nick
More information about the Binutils
mailing list