This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: relax jalr $t9 [R_MIPS_JALR symbol] to bal symbol
On Mon, Mar 24, 2003 at 09:58:21PM -0800, cgd at broadcom dot com wrote:
> Is there something in the dynamic loader that makes sure that the
> "index in segment" aspect of mips jumps will be handled sanely?
Not specifically, but...
> I can imagine some ... fairly pathological cases (w/ n64) in which a
> given shared object is mapped crossing a 256MB boundary, screwing up
> jumps entirely... 8-)
One *could* have a PT_LOAD segment with >= 256MB alignment.
Technically this should work. This is somewhat tricky to
implement, since mmap doesn't take an alignment argument,
so it would be difficult to honor in ld.so. (Indeed, I
notice that glibc doesn't.)
But, we've not been discussing using jal in ET_DYN objects.
Instead, using them only in ET_EXEC objects. In that case
the load address is fixed, and thus we can check at link
time that we won't be crossing a segment boundary.
r~