kbuild: refactor code in modpost to improve maintainability

There were a great deal of overlap between the two functions
that check which sections may reference .init.text and .exit.text.
Factor out common check to a separate function and
sort entries in the original functions.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 file changed