diff options
author | Quentin Casasnovas <quentin.casasnovas@oracle.com> | 2015-04-13 07:25:15 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-04-13 07:33:04 -0400 |
commit | e5d8f59a5cfa76ab5ebe47622d0c569eddd42fbe (patch) | |
tree | 5f7f5306e36b1f4d56686f8175c21091c3b12b00 | |
parent | 52dc0595d540155436d91811f929bdc8afd6a2a1 (diff) |
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)
-rw-r--r-- | scripts/mod/modpost.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index e95aa28ce0f7..cbd53e08769d 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -930,6 +930,26 @@ enum mismatch { | |||
930 | EXTABLE_TO_NON_TEXT, | 930 | EXTABLE_TO_NON_TEXT, |
931 | }; | 931 | }; |
932 | 932 | ||
933 | /** | ||
934 | * Describe how to match sections on different criterias: | ||
935 | * | ||
936 | * @fromsec: Array of sections to be matched. | ||
937 | * | ||
938 | * @bad_tosec: Relocations applied to a section in @fromsec to a section in | ||
939 | * this array is forbidden (black-list). Can be empty. | ||
940 | * | ||
941 | * @good_tosec: Relocations applied to a section in @fromsec must be | ||
942 | * targetting sections in this array (white-list). Can be empty. | ||
943 | * | ||
944 | * @mismatch: Type of mismatch. | ||
945 | * | ||
946 | * @symbol_white_list: Do not match a relocation to a symbol in this list | ||
947 | * even if it is targetting a section in @bad_to_sec. | ||
948 | * | ||
949 | * @handler: Specific handler to call when a match is found. If NULL, | ||
950 | * default_mismatch_handler() will be called. | ||
951 | * | ||
952 | */ | ||
933 | struct sectioncheck { | 953 | struct sectioncheck { |
934 | const char *fromsec[20]; | 954 | const char *fromsec[20]; |
935 | const char *bad_tosec[20]; | 955 | const char *bad_tosec[20]; |