# This script checks prom_init.o to see what external symbols it # is using, if it finds symbols not in the whitelist it returns # an error. The point of this is to discourage people from # intentionally or accidentally adding new code to prom_init.c # which has side effects on other parts of the kernel.
# If you really need to reference something from prom_init.o add # it to the list below:
check_section()
{
file=$1
section=$2
size=$(objdump -h -j "$section""$file" 2>/dev/null | awk "\$2 == \"$section\" {print \$3}")
size=${size:-0} if [ "$size" -ne 0 ]; then
ERROR=1 echo"Error: Section $section not empty in prom_init.c" >&2 fi
}
for UNDEF in $($NM -u "$OBJ" | awk '{print $2}') do # On 64-bit nm gives us the function descriptors, which have # a leading . on the name, so strip it off here.
UNDEF="${UNDEF#.}"
case "$KBUILD_VERBOSE" in
*1*) echo"Checking prom_init.o symbol '$UNDEF'" ;;
esac
OK=0 for WHITE in $WHITELIST do if [ "$UNDEF" = "$WHITE" ]; then
OK=1
break fi done
# ignore register save/restore funcitons
case $UNDEF in
_restgpr_*|_restgpr0_*|_rest32gpr_*)
OK=1
;;
_savegpr_*|_savegpr0_*|_save32gpr_*)
OK=1
;;
esac
if [ $OK -eq 0 ]; then
ERROR=1 echo"Error: External symbol '$UNDEF' referenced" \ "from prom_init.c" >&2 fi done
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.