On Mon, 11 Feb 2019, Wilco Dijkstra wrote: > The GCC optimizer can generate symbols with non-zero offset from simple > if-statements. Bit zero is used for the Arm/Thumb state bit, so relocations > with offsets fail if it changes bit zero and the relocation forces bit zero > to true. The fix is to disable offsets on function pointer symbols. > > ARMv5te bootstrap OK, regression tests pass. OK for commit?
Just to be sure the issue is analyzed properly: if it's certain that this usage is not allowed, shouldn't the linker produce a diagnostic instead of silently concealing the issue? With Gold linker this is handled correctly. So it looks to me like a bug in BFD linker, where it ignores any addend (not just +1/-1) when resolving a relocation against a Thumb function. Alexander