For some versions and execution modes, VxWorks features facilities to let
users download object modules and link them with the kernel at run-time.

Relocation troubles (24bit reloc overflows) might show up when module
instructions contain short references to kernel symbols and the module
happens to be loaded very far away from the kernel in memory.

As of today, the powerpc "__trampoline_setup" function embeds such a
potentially problematic reference, in the short call the "abort" at the

The attached patch is a suggestion to prevent the potential troubles
by simply issuing a longcall sequence in the relevant case (vxworks, !pic).

We have been using it in our internal trees for years now. Tested on
mainline by checking that a linux hosted build for powerpc-wrs-vxworks
succeeds and that the expected sequence is found in the tramp.o of

OK to commit ?

Thanks in advance,

With Kind Regards,


2012-04-12  Olivier Hainque  <hain...@adacore.com>

        * config/rs6000/vxworks/tramp.S (trampoline_setup): Use a longcall
        sequence in the non pic case on VxWorks.

Attachment: vxtramp.dif
Description: video/dv

Reply via email to