summaryrefslogtreecommitdiff
path: root/scripts/link-vmlinux.sh
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-02-19 16:58:41 +0000
committerMark Brown <broonie@kernel.org>2024-02-19 16:58:41 +0000
commitd68ce3aa8142333a96a071a9a0207f21c04e54cc (patch)
tree15754707ec571eb08c8d6308fe2459e46b8a5468 /scripts/link-vmlinux.sh
parentec29a4d9b7c7329afc61e7932cb91e9b292b2b74 (diff)
parentb401b621758e46812da61fa58a67c3fd8d91de0d (diff)
regulator: Merge up v6.8-rc5
There are dependencies on the PWM fixes for some new work on the PWM driver.
Diffstat (limited to 'scripts/link-vmlinux.sh')
-rwxr-xr-xscripts/link-vmlinux.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index a432b171be82..7862a8101747 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -135,8 +135,13 @@ gen_btf()
${OBJCOPY} --only-section=.BTF --set-section-flags .BTF=alloc,readonly \
--strip-all ${1} ${2} 2>/dev/null
# Change e_type to ET_REL so that it can be used to link final vmlinux.
- # Unlike GNU ld, lld does not allow an ET_EXEC input.
- printf '\1' | dd of=${2} conv=notrunc bs=1 seek=16 status=none
+ # GNU ld 2.35+ and lld do not allow an ET_EXEC input.
+ if is_enabled CONFIG_CPU_BIG_ENDIAN; then
+ et_rel='\0\1'
+ else
+ et_rel='\1\0'
+ fi
+ printf "${et_rel}" | dd of=${2} conv=notrunc bs=1 seek=16 status=none
}
# Create ${2} .S file with all symbols from the ${1} object file