This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

use longcall to abort from !pic trampoline setup on ppc-vxworks


Hello,

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
end.

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
interest.

OK to commit ?

Thanks in advance,

With Kind Regards,

Olivier

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

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

Attachment: vxtramp.dif
Description: video/dv


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]