This is the mail archive of the mailing list for the glibc 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 prelink for mips

On Fri, Jan 18, 2002 at 08:54:06AM +0100, Jakub Jelinek wrote:
> On Thu, Jan 17, 2002 at 03:00:04PM -0800, H . J . Lu wrote:
> > Some patch is necessary since mips doesn't have elf_machine_rela. You
> > can define a dummy elf_machine_rela in sysdeps/mips/dl-machine.h. But
> > ...
> Is it that hard to just define it to print a message that prelinking is not
> supported?

Why do we need such a message?

> > > Whether or not it can be implemented on MIPS is another question.
> > > Prelinking has advantages over SGI's quickstart so it's certainly
> > > desirable to try implementing preload.  If this is not possible we
> > > still can move the file or make other changes which allow using it in
> > > all situations.  It should not be necessary today, though.
> > 
> > The problem is the MIPS ABI is written for quickstart. It is very
> > different from other ELF ABIs. I don't believe we can implement
> > prelink with that ABI.
> prelink breaks the native ABI on most arches if not LD_BIND_NOW=1
> (the thing is that if you have a prelinked library or binary, you
> have to do some action to undo .plt prelinking if prelinking cannot
> be used). Plus on ia32 and arm it breaks the ABI by sometimes using RELA
> instead of the mandated REL relocs (though this is quite rare).
> I don't see anything which would make prelinking impossible to implement on
> mips (aside from time constraints).

For mips, there are no relocation relocation records for GOT. The GOT
relocation is computed by rules. BTW, there is no PLT for mips. If you
take a look at mips's dl-machine.h, you will find it is very different
from others in relocation and symbol resolution.

> > However, I do believe we can implement quickstart similar to prelink.
> At least how I understand quickstart, if you have any conflicts, it is very
> costly.

It doesn't have to be. We can tell to unset quickstart value or
just ignore quickstart value. I think it can be done.


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