This is the mail archive of the binutils@sources.redhat.com 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: relax jalr $t9 [R_MIPS_JALR symbol] to bal symbol


On Mar 25, 2003, Richard Henderson <rth at redhat dot com> wrote:

> 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.)

glibc does pass a suggested map address to the kernel, computed using
the PH alignment.

> 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.

Right.  We even have relocation we can use for this: R_MIPS_26.
However, at least for now, I'll have to leave the implementation of
this alternate relaxation as an exercise for the reader :-)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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