We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6a0646 commit a42d8d6Copy full SHA for a42d8d6
scripts/link-vmlinux.sh
@@ -171,8 +171,13 @@ gen_btf()
171
${OBJCOPY} --only-section=.BTF --set-section-flags .BTF=alloc,readonly \
172
--strip-all ${1} ${2} 2>/dev/null
173
# Change e_type to ET_REL so that it can be used to link final vmlinux.
174
- # Unlike GNU ld, lld does not allow an ET_EXEC input.
175
- 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
176
+ et_rel='\0\1'
177
+ else
178
+ et_rel='\1\0'
179
+ fi
180
+ printf "${et_rel}" | dd of=${2} conv=notrunc bs=1 seek=16 status=none
181
}
182
183
# Create ${2} .S file with all symbols from the ${1} object file
0 commit comments