Skip to content

Commit

Permalink
modpost: document the use of struct section_check.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Rusty Russell <[email protected]> (Fixed "mist"ake)
  • Loading branch information
Quentin Casasnovas authored and rustyrussell committed Apr 13, 2015
1 parent 52dc059 commit e5d8f59
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit e5d8f59

Please sign in to comment.