Skip to content

Commit e5d8f59

Browse files
Quentin Casasnovasrustyrussell
authored andcommitted
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)
1 parent 52dc059 commit e5d8f59

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

scripts/mod/modpost.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,26 @@ enum mismatch {
930930
EXTABLE_TO_NON_TEXT,
931931
};
932932

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+
*/
933953
struct sectioncheck {
934954
const char *fromsec[20];
935955
const char *bad_tosec[20];

0 commit comments

Comments
 (0)