This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
MIPS stubs in Gold
- From: Aleksandar Simeonov <Aleksandar dot Simeonov at RT-RK dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: binutils at sourceware dot org, rich at mips dot com
- Date: Wed, 01 Jun 2011 15:12:49 +0200
- Subject: MIPS stubs in Gold
Hi Ian,
Again I have problem that occupy me for some time and for what I can't
find solution. Situation is as follows (next text is taken from
elfxx-mips.c from ld):
"Information about a non-PIC interface to a PIC function. There are
two ways of creating these interfaces. The first is to add:
lui $25,%hi(func)
addiu $25,$25,%lo(func)
immediately before a PIC function "func". The second is to add:
lui $25,%hi(func)
j func
addiu $25,$25,%lo(func)
to a separate trampoline section.
Stubs of the first kind go in a new section immediately before the
target function. Stubs of the second kind go in a single section
pointed to by the hash table's "strampoline" field."
I tried to find something similar in Gold for other architectures, but
without success. Can you give me some suggestions where to look and what
to do to implement this.
Thanks in advance for your help,
Aleksandar