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 1fd7432 commit d0c7f12Copy full SHA for d0c7f12
scripts/link-vmlinux.sh
@@ -138,8 +138,13 @@ gen_btf()
138
${OBJCOPY} --only-section=.BTF --set-section-flags .BTF=alloc,readonly \
139
--strip-all ${1} ${2} 2>/dev/null
140
# Change e_type to ET_REL so that it can be used to link final vmlinux.
141
- # Unlike GNU ld, lld does not allow an ET_EXEC input.
142
- 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
143
+ et_rel='\0\1'
144
+ else
145
+ et_rel='\1\0'
146
+ fi
147
+ printf "${et_rel}" | dd of=${2} conv=notrunc bs=1 seek=16 status=none
148
}
149
150
# Create ${2} .o file with all symbols from the ${1} object file
0 commit comments