Allow copy relocations with pie links

Cary Coutant ccoutant@google.com
Tue May 13 16:52:00 GMT 2014


> Changed and patch attached.

        * symtab.h (may_need_copy_reloc): Remove check for position independent
        code.
        * x86_64.cc (Target_x86_64<size>::Scan::global): Add check for no
        position independence before pc absolute may_need_copy_reloc call.
        Add check for executable output befor pc relative may_need_copy_reloc
        call.
        * i386.cc: Ditto.
        * arm.cc: Ditto.
        * sparc.cc: Ditto.
        * tilegx.cc: Ditto.
        * powerpc.cc: Add check for no position independence before
        may_need_copy_reloc calls.
        * testsuite/pie_copyrelocs_test.cc: New file.
        * testsuite/pie_copyrelocs_shared_test.cc: New file.
        * Makefile.am (pie_copyrelocs_test): New test.
        * Makefile.in: Regenerate.

This is OK to commit now -- I think it's safe for ARM and tilegx. Thanks!

-cary



More information about the Binutils mailing list