summaryrefslogtreecommitdiffstats
path: root/scripts/mod
diff options
context:
space:
mode:
authorQuentin Casasnovas <quentin.casasnovas@oracle.com>2015-04-13 20:55:15 +0930
committerRusty Russell <rusty@rustcorp.com.au>2015-04-13 21:03:04 +0930
commite5d8f59a5cfa76ab5ebe47622d0c569eddd42fbe (patch)
tree5f7f5306e36b1f4d56686f8175c21091c3b12b00 /scripts/mod
parent52dc0595d540155436d91811f929bdc8afd6a2a1 (diff)
downloadop-kernel-dev-e5d8f59a5cfa76ab5ebe47622d0c569eddd42fbe.zip
op-kernel-dev-e5d8f59a5cfa76ab5ebe47622d0c569eddd42fbe.tar.gz
modpost: document the use of struct section_check.
struct section_check is used as a generic way of describing what relocations are authorized/forbidden when running modpost. This commit tries to describe how each field is used. Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Fixed "mist"ake)
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/modpost.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index e95aa28..cbd53e0 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -930,6 +930,26 @@ enum mismatch {
EXTABLE_TO_NON_TEXT,
};
+/**
+ * Describe how to match sections on different criterias:
+ *
+ * @fromsec: Array of sections to be matched.
+ *
+ * @bad_tosec: Relocations applied to a section in @fromsec to a section in
+ * this array is forbidden (black-list). Can be empty.
+ *
+ * @good_tosec: Relocations applied to a section in @fromsec must be
+ * targetting sections in this array (white-list). Can be empty.
+ *
+ * @mismatch: Type of mismatch.
+ *
+ * @symbol_white_list: Do not match a relocation to a symbol in this list
+ * even if it is targetting a section in @bad_to_sec.
+ *
+ * @handler: Specific handler to call when a match is found. If NULL,
+ * default_mismatch_handler() will be called.
+ *
+ */
struct sectioncheck {
const char *fromsec[20];
const char *bad_tosec[20];
OpenPOWER on IntegriCloud