scsi: esas2r: Switch to flexible array member
[linux-2.6-microblaze.git] / scripts / link-vmlinux.sh
index e9516bd..f4de4c9 100755 (executable)
@@ -220,6 +220,7 @@ vmlinux_link()
 gen_btf()
 {
        local pahole_ver
+       local extra_paholeopt=
 
        if ! [ -x "$(command -v ${PAHOLE})" ]; then
                echo >&2 "BTF: ${1}: pahole (${PAHOLE}) is not available"
@@ -234,8 +235,12 @@ gen_btf()
 
        vmlinux_link ${1}
 
+       if [ "${pahole_ver}" -ge "121" ]; then
+               extra_paholeopt="${extra_paholeopt} --btf_gen_floats"
+       fi
+
        info "BTF" ${2}
-       LLVM_OBJCOPY=${OBJCOPY} ${PAHOLE} -J ${1}
+       LLVM_OBJCOPY=${OBJCOPY} ${PAHOLE} -J ${extra_paholeopt} ${1}
 
        # Create ${2} which contains just .BTF section but no symbols. Add
        # SHF_ALLOC because .BTF will be part of the vmlinux image. --strip-all
@@ -315,20 +320,6 @@ cleanup()
        rm -f .vmlinux.d
 }
 
-on_exit()
-{
-       if [ $? -ne 0 ]; then
-               cleanup
-       fi
-}
-trap on_exit EXIT
-
-on_signals()
-{
-       exit 1
-}
-trap on_signals HUP INT QUIT TERM
-
 # Use "make V=1" to debug this script
 case "${KBUILD_VERBOSE}" in
 *1*)