> - for completeness, I made a quick PICification of the aes-mips32. MIPS
> indeed seem much more easy on PIC code.

For [future] reference. PIC-ification on MIPS involves setting up $gp
(achieved with .cpload directive under o32) and addressing relative to
its value (achieved with .option pic2 directive). E.g. here is how 'la
$n,label' is expanded without .option pic2 directive:

        lui     $n,xxxx
        addiu   $n,yyyy

where xxxxyyyy is absolute value, which needs to be adjusted if code is
relocated. And here is with .option pic2 directive:

        lw      $n,xxxx($gp)
        addiu   $n,yyyy

where xxxx and yyyy are disjoint "magic" values composed at link time in
position-independent manner. And you should avoid non-PC-relative
instructions, more specifically j[al], and adhere to b[al] instead. A.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to