[gold][patch] Plugin API and PIE binaries

Rafael Espíndola rafael.espindola@gmail.com
Tue Jun 12 16:12:00 GMT 2012


I don't think there is any support for PIE in the current plugin api.
Gold currently only passes the plugin LDPO_EXEC, which causes problem
when the plugin then gives gold an object with invalid relocations.

The attached patches add a LDPO_PIE. I don't think this is a backward
compatibility problem, since any plugin producing code for a PIE
thinking it is a regular executable is already broken.

Cheers,
Rafael

gold patch:

2012-06-12  Rafael Ávila de Espíndola <respindola@mozilla.com>

        * plugin.cc (Plugin::load): Handle position independent executables.

include patch:

2012-06-12  Rafael Ávila de Espíndola <respindola@mozilla.com>

        *  plugin-api.h (ld_plugin_output_file_type): Add LDPO_PIE.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gold.patch
Type: application/octet-stream
Size: 388 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20120612/3ef207db/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: include.patch
Type: application/octet-stream
Size: 317 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20120612/3ef207db/attachment-0001.obj>


More information about the Binutils mailing list