This is the mail archive of the
mailing list for the GCC project.
Re: PING for PowerPC: Add msingle-pic-base option
Alan Modra <firstname.lastname@example.org> wrote on 2010/11/23 02:32:20:
> On Tue, Nov 23, 2010 at 01:25:41AM +0100, Joakim Tjernlund wrote:
> > It is impossible (as is today) to tell which ptr's in the GOT needs
> > fixup and those which don't.
> This is where we disagree. I think all of .got should be relocated,
> except for the header. If I'm correct, then fixups for .got are
> redundant and therefore just a waste of space.
I we have an misunderstanding here. The got itself does not need fixups but
some of the data it points to needs fixup. Today you construct a separate
table with fixup pointers but I think this table is really redundant.
If you could somehow known which got ptrs points to data needing fixup you
could do the fixup by following the got ptr.
Suppose you could organise the got table so that first you all
got ptrs that don't need fixups and then all the ones that do need fixups:
/* No fixups for these */
_FIXUP_START = .
/* These needs fixup */
Now you relocate the whole .got as usual, then go back and
run fixup from _FIXUP_START and you are done.
The problem is how to make the linker do this for us.
I cannot think of a way really, perhaps one could mark all
syms needing fixups with a different type such as
.type xxxx, @gnu_indirect_function