We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5c4128 commit 3c0f444Copy full SHA for 3c0f444
scripts/link-vmlinux.sh
@@ -222,8 +222,13 @@ gen_btf()
222
${OBJCOPY} --only-section=.BTF --set-section-flags .BTF=alloc,readonly \
223
--strip-all ${1} ${2} 2>/dev/null
224
# Change e_type to ET_REL so that it can be used to link final vmlinux.
225
- # Unlike GNU ld, lld does not allow an ET_EXEC input.
226
- 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
227
+ et_rel='\0\1'
228
+ else
229
+ et_rel='\1\0'
230
+ fi
231
+ printf "${et_rel}" | dd of=${2} conv=notrunc bs=1 seek=16 status=none
232
}
233
234
# Create ${2} .S file with all symbols from the ${1} object file
0 commit comments