This is the mail archive of the
mailing list for the binutils project.
Re: the problem : assign the section's order in shared library based on mips platform
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: eagle_zhou at ali dot com dot tw
- Cc: binutils at sources dot redhat dot com
- Date: 11 Nov 2004 01:13:32 -0500
- Subject: Re: the problem : assign the section's order in shared library based on mips platform
- References: <OFE9E82762.7582DAE2-ON48256F49.001E4D3A@LocalDomain>
> Yes, I am writing own dynamic loader/linker. And use our own operation
> I have parsed all relocation info and generate my own data struct which
> will be
> resolved by my own dynamic loader/linker.
> So i do not need it's other info(string,symbol,and so on) again.
> I only use it's text and data section.
> my aim is putting text and data section into continuous space and take out
> them from .so file.
> but now, i meet those problem i mentioned.
If I were you I would rewrite the calling convention, including the
GOT and the PLT, into something appropriate for your system. If you
don't want to do that, then you will need to get a clear understanding
of the current system.
If I understood your question correctly, you are wondering why the
stub code starts with the instruction
In the current ELF support, MIPS stub code always starts with that
instruction. The dynamic linker is responsible for filling that word
with the address of the runtime resolution routine. The resolution
routine will then fill in the GOT entry for the initial function (in
your example, 140(gp)) so that future calls will bypass the stub
One step you need to take if you want to go this path is to set _gp in
your linker script. The linker will use that in calculating GP
relocations (at least, that is how it used to work; I don't know
whether there is a more intelligent way to set the GP value these