This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [IFUNC] PATCH: Add an ifunc attribute


On Sun, Jun 28, 2009 at 10:23 AM, Ralf Wildenhues<Ralf.Wildenhues@gmx.de> wrote:
> Hello H.J.,
>
> some typos and grammar errors:
>
> * H.J. Lu wrote on Sun, Jun 28, 2009 at 05:10:52PM CEST:
>> ? ? ? * doc/extend.texi: Document ifunc attribute.
>
>> --- gcc/doc/extend.texi ? ? ? (.../fsf/trunk) (revision 6328)
>> +++ gcc/doc/extend.texi ? ? ? (.../branches/ifunc) ? ?(revision 6328)
>> @@ -1924,6 +1924,28 @@ is not defined in the same translation u
>>
>> ?Not all target machines support this attribute.
>>
>> +@item ifunc
>> +@cindex @code{ifunc} attribute
>> +The @code{ifunc} attribute only applies to function definition, which
>
> to a function definition
>
>> +causes the definition to be emitted as an indirec function. ?For
>
> indirect
>
>> +instance,
>> +
>> +@smallexample
>> +int f (int) __attribute__ ((ifunc));
>> +@end smallexample
>> +
>
> Insert @noindent (on a line by itself) here, to continue the paragraph.
>
>> +defines @samp{f} as an indirect function. ?@samp{f} should return a
>> +pointer to the actual function that should be executed as @samp{f}.
>> +@samp{f} is called only by dynamic linker without any arguments.
>
> the dynamic linker, and
>
>> +It is an error if @samp{f} is undefined in the same translation unit,
>
> s/undefined/not defined/ ?sounds more appropriate to me.
>
>> +or any parameters are used inside @samp{f}, or the return type isn't
>> +a pointer to @samp{f}.
>> +
>> +See @code{STT_GNU_IFUNC} specified in @file{ifunc.txt} at
>> +@uref{http://groups.google.com/group/generic-abi/files}.
>> +
>> +Not all target machines support this attribute.
>
> I think ? s/target machines/targets/ ?is better, but I'm not sure.
>
> Cheers,
> Ralf
>

I checked this patch into ifunc branch.

Thanks.

-- 
H.J.
--
Index: doc/extend.texi
===================================================================
--- doc/extend.texi     (revision 149038)
+++ doc/extend.texi     (working copy)
@@ -1926,25 +1926,27 @@ Not all target machines support this att

 @item ifunc
 @cindex @code{ifunc} attribute
-The @code{ifunc} attribute only applies to function definition, which
-causes the definition to be emitted as an indirec function.  For
+The @code{ifunc} attribute only applies to a function definition, which
+causes the definition to be emitted as an indirect function.  For
 instance,

 @smallexample
 int f (int) __attribute__ ((ifunc));
 @end smallexample

+@noindent
+
 defines @samp{f} as an indirect function.  @samp{f} should return a
 pointer to the actual function that should be executed as @samp{f}.
-@samp{f} is called only by dynamic linker without any arguments.
-It is an error if @samp{f} is undefined in the same translation unit,
+@samp{f} is called only by the dynamic linker without any arguments.
+It is an error if @samp{f} is not defined in the same translation unit,
 or any parameters are used inside @samp{f}, or the return type isn't
 a pointer to @samp{f}.

 See @code{STT_GNU_IFUNC} specified in @file{ifunc.txt} at
 @uref{http://groups.google.com/group/generic-abi/files}.

-Not all target machines support this attribute.
+Not all targets support this attribute.

 @item aligned (@var{alignment})
 @cindex @code{aligned} attribute
Index: ChangeLog.ifunc
===================================================================
--- ChangeLog.ifunc     (revision 149038)
+++ ChangeLog.ifunc     (working copy)
@@ -1,5 +1,9 @@
 2009-06-28  H.J. Lu  <hongjiu.lu@intel.com>

+       * doc/extend.texi: Update ifunc attribute document.
+
+2009-06-28  H.J. Lu  <hongjiu.lu@intel.com>
+
        PR c/40528
        * c-common.c (handle_ifunc_attribute): New.
        (c_common_attribute_table): Add "ifunc".
gnu-6:pts/9[21]> m /tmp/z                      /export/gnu/import/gcc-ifunc/gcc
Index: doc/extend.texi
===================================================================
--- doc/extend.texi     (revision 149038)
+++ doc/extend.texi     (working copy)
@@ -1926,25 +1926,27 @@ Not all target machines support this att

 @item ifunc
 @cindex @code{ifunc} attribute
-The @code{ifunc} attribute only applies to function definition, which
-causes the definition to be emitted as an indirec function.  For
+The @code{ifunc} attribute only applies to a function definition, which
+causes the definition to be emitted as an indirect function.  For
 instance,

 @smallexample
 int f (int) __attribute__ ((ifunc));
 @end smallexample

+@noindent
+
 defines @samp{f} as an indirect function.  @samp{f} should return a
 pointer to the actual function that should be executed as @samp{f}.
-@samp{f} is called only by dynamic linker without any arguments.
-It is an error if @samp{f} is undefined in the same translation unit,
+@samp{f} is called only by the dynamic linker without any arguments.
+It is an error if @samp{f} is not defined in the same translation unit,
 or any parameters are used inside @samp{f}, or the return type isn't
 a pointer to @samp{f}.

 See @code{STT_GNU_IFUNC} specified in @file{ifunc.txt} at
 @uref{http://groups.google.com/group/generic-abi/files}.

-Not all target machines support this attribute.
+Not all targets support this attribute.

 @item aligned (@var{alignment})
 @cindex @code{aligned} attribute
Index: ChangeLog.ifunc
===================================================================
--- ChangeLog.ifunc     (revision 149038)
+++ ChangeLog.ifunc     (working copy)
@@ -1,5 +1,9 @@
 2009-06-28  H.J. Lu  <hongjiu.lu@intel.com>

+       * doc/extend.texi: Update ifunc attribute document.
+
+2009-06-28  H.J. Lu  <hongjiu.lu@intel.com>
+
        PR c/40528
        * c-common.c (handle_ifunc_attribute): New.
        (c_common_attribute_table): Add "ifunc".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]