This is the mail archive of the mailing list for the binutils 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: [MIPS] R_MIPS_GOT_DISP interferes with lazy binding

Lee Duhem <> writes:
> My questions are:
> 1. Are the relocation types of DRIBlockHandler and DRIWakeupHandler correct?

It depends on what the source code is doing.  The two DRIBlockHandler
R_MIPS_CALL16s sites are obviously direct calls to the function, but is
the R_MIPS_GOT_DISP site too?  Or is the code taking the address of
DRIBlockHandler, e.g. to use it as a callback?

It's a bug if the compiler is generating a R_MIPS_GOT_DISP for
a direct call.  (This might happen, e.g., due to overly aggressive
hoisting or CSE.)  On the other hand, R_MIPS_GOT_DISP is the correct
choice if something is taking the address of the function.

> 2. If they are correct, is the information of these symbols in
> correct, in other words,
> did ld handle them correctly?
> 3. If the answers to the first two questions are both true, does this
> mean that the dlopen failure
> is a dynamic linker ( bug?

The static and dynamic linkers are doing the right thing;
R_MIPS_GOT_DISP is supposed to disable lazy resolution.


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