This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: libiberty...
- To: Scott Bambrough <scottb at netwinder dot org>
- Subject: Re: libiberty...
- From: Roland McGrath <roland at frob dot com>
- Date: Fri, 19 Nov 1999 15:50:16 -0500
- Cc: Philip Blundell <Philip dot Blundell at pobox dot com>, binutils mailing list <binutils at sourceware dot cygnus dot com>
> It is dubious. And I don't think the dynamic linker is at fault.
Sorry, you are mistaken. It is obscure, but completely well-specified and
valid. The dynamic linker is indeed at fault, and that opinion is the
consensus of all the people responsible for maintaining the dynamic linker.
That said, it remains that same consensus holds that it's not worth
bothering with implementing those relocs in the dynamic linker until
someone finds a need and feels compelled to do it and send in a patch. It
is the expectation that anyone who makes use of this obscure feature (which
as yet is not fully implemented in the GNU dynamic linker) was most likely
doing so by accident, i.e. they really wanted to compile their code as PIC.
So far this has been the case, as we all seem to think it is with Mozilla
too. But that does not change the fact that supporting all relocs in the
dynamic linker is clearly the correct thing to do by the spec, and we will
most likely do it as soon as anyone comes along who truly wants it done.
Since having relocs in text sucks wet goat farts as a general rule, I think
it would be useful to have a warning (though perhaps not on by default)
from the linker whenever it finds DT_TEXTREL is necessary. Note that this
can commonly come up with things like "type *const foo = &bar;" that
require a run-time relocation for the address of `bar'.