Thread (12 messages) 12 messages, 4 authors, 2016-02-09

Re: [PATCH 3/3] Documentation for the GCC plugin infrastructure

From: Emese Revfy <hidden>
Date: 2016-02-09 19:16:16

On Mon, 8 Feb 2016 20:27:31 -0800
Kees Cook [off-list ref] wrote:
On Sun, Feb 7, 2016 at 1:32 PM, Emese Revfy [off-list ref] wrote:
quoted
This is the GCC infrastructure documentation about its operation, how to add
and use a new plugin with an example.

---
 Documentation/example_gcc_plugin.c | 103 +++++++++++++++++++++++++++++++++++++
Perhaps this example should live in samples/gcc_plugin/ ?
Perhaps the example plugin is unnecessary. I should use the cyclomatic complexity plugin
because I already wrote about it in the sections "Usage" and "How to add a new GCC plugin"
and they differ by only two lines.
For an example, I'd expect verbose comments. :) Imagine someone
reading it who knows very little about plugins or compiler internals.
I think gcc has very good documentation about plugins, I reference them from gcc-plugins.txt,
you can see it below. If you think it isn't enough tell me please what you would like to
see as additional documentation.  
quoted
+1. Introduction
+===============
+
+GCC plugins are loadable modules that provide extra features to the
+compiler [1]. They are useful for runtime instrumentation and static analysis.
+We can analyse, change and add further code during compilation via
+callbacks [2], GIMPLE [3], IPA [4] and RTL passes [5].
+
+The GCC plugin infrastructure of the kernel supports all gcc versions from
+4.5 to 6.0, building out-of-tree modules, cross-compilation and building in a
+separate directory.
+
+Currently the GCC plugin infrastructure supports only the x86 architecture.
+
+This infrastructure was ported from grsecurity [6] and PaX [7].
+
+--
+[1] https://gcc.gnu.org/onlinedocs/gccint/Plugins.html
+[2] https://gcc.gnu.org/onlinedocs/gccint/Plugin-API.html#Plugin-API
+[3] https://gcc.gnu.org/onlinedocs/gccint/GIMPLE.html
+[4] https://gcc.gnu.org/onlinedocs/gccint/IPA.html
+[5] https://gcc.gnu.org/onlinedocs/gccint/RTL.html
+[6] https://grsecurity.net/
+[7] https://pax.grsecurity.net/
-- 
Emese
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help