Improvements and fixes for mips n32/n64 relocations

Alexandre Oliva aoliva@redhat.com
Tue Apr 8 10:20:00 GMT 2003


We used to generate really lousy code for n32/n64.  For example, we
used to emit a constant `addi reg,reg,0' after a GOT_DISP load that
served no purpose at all.  We used to waste GOT entries by not using
GOT_PAGE/GOT_OFST properly, and not placing GOT_OFST in the load or
store instruction that causes us to use this addressing mode.  The
code generated for -xgot in n32/n64 was completely broken.  We used to
not decay GOT_PAGE/GOT_OFST to GOT_DISP/addend on symbols that could
be overridden in other shared libraries or in the main executable.  We
used to emit addu/addiu when doing pointer arithmetics on n32, unlike
the recommended add/addi in the MIPSpro N32 Handbook: ``PTR_ADDU expands
to addu for o32 and to add for n32.''

Ok to install?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips-newabi-got-opt.patch
Type: text/x-patch
Size: 216926 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20030408/352fc1fe/attachment.bin>
-------------- next part --------------

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


More information about the Binutils mailing list