[PATCH] bpf: fix false overflow in eBPF ELF backend linker

Jose E. Marchesi jose.marchesi@oracle.com
Fri Aug 7 18:38:47 GMT 2020


Hi David.

> When performing DISP{16,32} relocations, the eBPF ELF backend linker
> needs to convert the relocation from an address into a signed number
> of 64-bit words (minus one) to jump.
>
> Because of this unsigned-to-signed conversion, special care needs to
> be taken when dividing to ensure the sign bits remain correct.
> Otherwise, a false relocation overflow error can be triggered.

Thanks for the patch :)

I just applied it with just a minor tweak to avoid repetition in the
comments.

Salud!


More information about the Binutils mailing list