We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4ff585 commit 465e209Copy full SHA for 465e209
scripts/link-vmlinux.sh
@@ -199,8 +199,13 @@ gen_btf()
199
${OBJCOPY} --only-section=.BTF --set-section-flags .BTF=alloc,readonly \
200
--strip-all ${1} ${2} 2>/dev/null
201
# Change e_type to ET_REL so that it can be used to link final vmlinux.
202
- # Unlike GNU ld, lld does not allow an ET_EXEC input.
203
- 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
204
+ et_rel='\0\1'
205
+ else
206
+ et_rel='\1\0'
207
+ fi
208
+ printf "${et_rel}" | dd of=${2} conv=notrunc bs=1 seek=16 status=none
209
}
210
211
# Create ${2} .o file with all symbols from the ${1} object file
0 commit comments