This is the mail archive of the
mailing list for the binutils project.
Re: [MIPS] R_MIPS_GOT_DISP interferes with lazy binding
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Lee Duhem <lee dot duhem at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 07 May 2013 11:32:22 +0100
- Subject: Re: [MIPS] R_MIPS_GOT_DISP interferes with lazy binding
- References: <CAOSer0CqJNce0fpfanBR0ONOm8Gp3B+A9jzQN1Nv9nxbec2KfA at mail dot gmail dot com>
Lee Duhem <email@example.com> 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
> libglx.so 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 (ld.so) bug?
The static and dynamic linkers are doing the right thing;
R_MIPS_GOT_DISP is supposed to disable lazy resolution.