This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Fix trampolines on PA on 32 bit machines
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Subject: Re: PATCH: Fix trampolines on PA on 32 bit machines
- From: law at redhat dot com
- Date: Mon, 24 Sep 2001 09:47:54 -0600
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <200109221855.f8MIt1fG023581@hiauly1.hia.nrc.ca>you write:
> This fixes a problem noted with the HP assembler involving calling
> nested functions indirectly. It turns out that the HP assembler and
> linker conspire together to change calls to $$dyncall to $$dyncall_external
> .
> The assembler does this by setting R_RESERVED in the relocation data
> for $$dyncall. Yikes!
>
> The current trampoline implementation uses an indirect call to the
> trampoline on the stack without a plabel. $$dyncall checks to see
> if a plabel is being used for the indirect call while $$dyncall_external
> doesn't. $$dyncall_external assumes that a plabel is being used.
>
> This patch adds a plabel to the trampoline and initializes it accordingly.
> I think it now should be possible to call a nested function indirectly
> from a shared library. Note this is only for non 64 bit machines.
>
> Bootstrap checked with no regressions on hppa1.1-hp-hpux10.20.
>
> OK?
>
> Dave
> --
> J. David Anglin dave.anglin@nrc.ca
> National Research Council of Canada (613) 990-0752 (FAX: 952-6
> 605)
>
> 2001-09-14 John David Anglin <dave@hiauly1.hia.nrc.ca>
>
> * pa.h (TRAMPOLINE_TEMPLATE): Add two words to the template for
> non 64-bit machines. Use these as a plabel for the trampoline.
> (TRAMPOLINE_SIZE): Adjust size for new words.
> (INITIALIZE_TRAMPOLINE): Initialize new words.
> (TRAMPOLINE_ADJUST_ADDRESS): New. Adjust address to make it a
> pointer to the plabel in the trampoline.
Approved. Please install.
jeff