[PATCH v5] MIPS: Reject branch absolute relocs for PIC for linking
Maciej W. Rozycki
macro@orcam.me.uk
Wed Feb 21 12:59:20 GMT 2024
On Thu, 8 Feb 2024, YunQiang Su wrote:
> The asm code like:
> b (8)
> will emit absolute relocs like:
> R_MIPS_PC16 *ABS*
>
> If they are included into PIC shared objects or PIE executables,
> the branch target will be like 0x12340000, which will make the
> programs crash.
This needs a proper LD test case. I don't think `8' needs to be
parenthesised here.
Maciej
More information about the Binutils
mailing list