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]

Re: [PATCH] Fix -fpic/-fPIC virtual thunks on s390 -m31


On Fri, Jun 20, 2003 at 08:03:03PM +0200, Ulrich Weigand wrote:
> Unfortunately, as Joern pointed out this doesn't work either right now.

I'm working on a patch for that.
Nevertheless, at least for GCC 3.3 branch we should IMHO live with
thunk calls going through GOT and even on the trunk it means
output_mi_thunk is more robust.

> I've just one suggestion to improve the code for the -fPIC case: you
> could try to use @GOTENT.  This is not normally used on 31-bit, so I'm
> not sure binutils support is correct, but it is supposed to work.  The
> code would then look like this:
> 
> basr %r1,0
> .L6:
> a %r1,.L7-.L6(%r1)
> l %r1,0(%r1)
> br %r1
> .align 4
> .L7:
> .long the_function@GOTENT-.L6
> 
> (In fact this is just as efficient as the -fpic case, so the two
> could actually be merged.)

Apparently this does not work (at least not with almost a month old gas):

/tmp/I.s: Assembler messages:
/tmp/I.s:8: Error: relocation not applicable

	Jakub


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