Hi Alexander,

> It seems odd to me that the spec requires '(S+A) | T' instead of the (imho
> more intuitive) '(S|T) + A', but apart from the missing diagnostic from the
> linkers, it seems they do as they must and GCC was at fault.

Doing (S+A) | T means bit zero always correctly encodes the Thumb state,
otherwise the +A could change Thumb into Arm and visa versa.

> (perhaps it's okay to allow addends with low bit zero though, instead of
> allowing only zero addends as your patch does?)

Maybe, but there aren't many cases where an addend is useful. One really
shouldn't be doing arbitrary arithmetic with function pointers.

Cheers,
Wilco

Reply via email to