We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c97f49 commit 744ffddCopy full SHA for 744ffdd
scripts/link-vmlinux.sh
@@ -236,8 +236,13 @@ gen_btf()
236
${OBJCOPY} --only-section=.BTF --set-section-flags .BTF=alloc,readonly \
237
--strip-all ${1} ${2} 2>/dev/null
238
# Change e_type to ET_REL so that it can be used to link final vmlinux.
239
- # Unlike GNU ld, lld does not allow an ET_EXEC input.
240
- 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 [ -n "${CONFIG_CPU_BIG_ENDIAN}" ]; then
241
+ et_rel='\0\1'
242
+ else
243
+ et_rel='\1\0'
244
+ fi
245
+ printf "${et_rel}" | dd of=${2} conv=notrunc bs=1 seek=16 status=none
246
}
247
248
# Create ${2} .S file with all symbols from the ${1} object file
0 commit comments