plugin-api.h patch to add a new interface for linker plugins
Sriraman Tallam via binutils
binutils@sourceware.org
Thu Feb 15 21:52:00 GMT 2018
Ping, this patch was approved for binutils by Cary:
https://sourceware.org/ml/binutils/2017-12/msg00023.html
Is it ok to apply this to GCC include/plugin-api.h now? It is a
pretty small change. Patch attached.
* plugin-api.h (ld_plugin_get_wrap_symbols): New
plugin interface.
Thanks
Sri
On Fri, Dec 8, 2017 at 11:02 AM, Sriraman Tallam <tmsriram@google.com> wrote:
> Patch attached.
>
> * plugin-api.h (ld_plugin_get_wrap_symbols): New
> plugin interface.
>
> On Fri, Dec 8, 2017 at 11:01 AM, Sriraman Tallam <tmsriram@google.com> wrote:
>> Hi,
>>
>> This patch was approved for binutils by Cary:
>> https://sourceware.org/ml/binutils/2017-12/msg00023.html
>>
>> Is it ok to apply this to GCC include/plugin-api.h ?
>>
>> Thanks
>> Sri
-------------- next part --------------
* plugin-api.h (ld_plugin_get_wrap_symbols): New
plugin interface.
Index: include/plugin-api.h
===================================================================
--- include/plugin-api.h (revision 255515)
+++ include/plugin-api.h (working copy)
@@ -378,7 +378,15 @@
enum ld_plugin_status
(*ld_plugin_register_new_input) (ld_plugin_new_input_handler handler);
+/* The linker's interface for getting the list of wrapped symbols using the
+ --wrap option. This sets *NUM_SYMBOLS to number of wrapped symbols and
+ *WRAP_SYMBOL_LIST to the list of wrapped symbols. */
+typedef
+enum ld_plugin_status
+(*ld_plugin_get_wrap_symbols) (uint64_t *num_symbols,
+ const char ***wrap_symbol_list);
+
enum ld_plugin_level
{
LDPL_INFO,
@@ -422,7 +430,8 @@
LDPT_GET_SYMBOLS_V3 = 28,
LDPT_GET_INPUT_SECTION_ALIGNMENT = 29,
LDPT_GET_INPUT_SECTION_SIZE = 30,
- LDPT_REGISTER_NEW_INPUT_HOOK = 31
+ LDPT_REGISTER_NEW_INPUT_HOOK = 31,
+ LDPT_GET_WRAP_SYMBOLS = 32
};
/* The plugin transfer vector. */
@@ -457,6 +466,7 @@
ld_plugin_get_input_section_alignment tv_get_input_section_alignment;
ld_plugin_get_input_section_size tv_get_input_section_size;
ld_plugin_register_new_input tv_register_new_input;
+ ld_plugin_get_wrap_symbols tv_get_wrap_symbols;
} tv_u;
};
More information about the Binutils
mailing list