Re: plugin-api.h patch to add a new interface for linker plugins

2018-05-01 Thread Jeff Law
On 02/20/2018 10:35 AM, Sriraman Tallam via binutils wrote:
> Ping.  Is this alright to apply now or should I wait for Stage 1?
> 
> * plugin-api.h (ld_plugin_get_wrap_symbols): New
>   plugin interface.
> 
> Thanks
> Sri
> 
> On Thu, Feb 15, 2018 at 1:52 PM, Sriraman Tallam  wrote:
>> 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  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  
>>> 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 ?
OK for the trunk.

jeff


Re: plugin-api.h patch to add a new interface for linker plugins

2018-02-22 Thread Nick Clifton
Hi Cary, Hi Sriraman,

>> Ping.  Is this alright to apply now or should I wait for Stage 1?
>>
>> * plugin-api.h (ld_plugin_get_wrap_symbols): New
>>   plugin interface.
> 
> I'd say go ahead and apply the patch in binutils, and wait for Stage 1
> to sync back to GCC, unless someone there OKs it sooner.
> 
> Nick, is that OK?

Yes, that is fine with me.

Cheers
  Nick




Re: plugin-api.h patch to add a new interface for linker plugins

2018-02-20 Thread Cary Coutant
> Ping.  Is this alright to apply now or should I wait for Stage 1?
>
> * plugin-api.h (ld_plugin_get_wrap_symbols): New
>   plugin interface.

I'd say go ahead and apply the patch in binutils, and wait for Stage 1
to sync back to GCC, unless someone there OKs it sooner.

Nick, is that OK?

-cary


Re: plugin-api.h patch to add a new interface for linker plugins

2018-02-20 Thread Sriraman Tallam via gcc-patches
Ping.  Is this alright to apply now or should I wait for Stage 1?

* plugin-api.h (ld_plugin_get_wrap_symbols): New
  plugin interface.

Thanks
Sri

On Thu, Feb 15, 2018 at 1:52 PM, Sriraman Tallam  wrote:
> 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  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  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
* 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;
 };
 


Re: plugin-api.h patch to add a new interface for linker plugins

2018-02-15 Thread Sriraman Tallam via gcc-patches
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  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  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
* 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;
 };
 


Re: plugin-api.h patch to add a new interface for linker plugins

2017-12-08 Thread Sriraman Tallam via gcc-patches
Patch attached.

* plugin-api.h (ld_plugin_get_wrap_symbols): New
  plugin interface.

On Fri, Dec 8, 2017 at 11:01 AM, Sriraman Tallam  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
* 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;
 };