On Wed, Jan 27, 2016 at 8:37 AM, Christophe Lyon christophe.lyon@linaro.org wrote:
I confirm the trampolines are not inserted for ld -r.
We can't insert the trampolines with ld -r. We don't have all of the symbols required for this with a relocatable link. Also, for the symbols we do have, we don't know the final addresses, so we don't know which branches/calls will be out of range.
Maybe using -ffunction-sections would help?
Using -mlong-calls might be easier. You would only want this enabled for a allyesconfig build of course. This should solve the out-of-range calls to the spin lock functions. it probably doesn't help for the out-of-range branches to the .text.unlikely sections, but this is a gcc optimization that can be disabled with -fno-reorder-functions. This is again something you would only want for an allyesconfig build.
Jim