[parisc-linux] Re: [PATCH] gcc/config/pa/ftpr.c fixes for new TRAMPOLINE_TEMPLATE in

John David Anglin dave at hiauly1.hia.nrc.ca
Sat Feb 7 17:00:09 MST 2004


> The following patch is required in gcc to add another byte check for the
> new TRAMPOLINE_TEMPLATE that has profile fixes added in glibc 2.3.2.
> I've added comments in glibc to indicate that TRAMPOLINE_TEMPLATE
> changes are bad things to do. AFAIK this is the last change *ever* since
> we now have working profile support :)
> 
> I'm not quite sure what the "-4" is intended to accomplish, I figure I
> could have prefixed the TREAMPOLINE_TEMPLATE with another jump that
> gives the right address? That still makes for an extra jump, and I'd
> rather have gcc just look in the right place first.
> 
> Thoughts on this?

I'm just back from Japan and still somewhat jet lagged.

The change to the TRAMPOLINE_TEMPLATE macro introduces an ABI change.
In spite of the extra overhead, I think it would be better to do it
in a way that didn't require a libgcc.a update.  We only do a call
to fixup when a function pointer hasn't been resolved, so the extra
overhead in using "-4" isn't huge.

If we use the "-4" feature, I can reverse the search order in fptr.c
so that the offset at "-4" is searched first.  This also allows arbitrary
changes to the code in the rest of the template.

Dave
-- 
J. David Anglin                                  dave.anglin at nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


More information about the parisc-linux mailing list