We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6388cfd commit e3a9ee9Copy full SHA for e3a9ee9
scripts/link-vmlinux.sh
@@ -135,8 +135,13 @@ gen_btf()
135
${OBJCOPY} --only-section=.BTF --set-section-flags .BTF=alloc,readonly \
136
--strip-all ${1} ${2} 2>/dev/null
137
# Change e_type to ET_REL so that it can be used to link final vmlinux.
138
- # Unlike GNU ld, lld does not allow an ET_EXEC input.
139
- 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 is_enabled CONFIG_CPU_BIG_ENDIAN; then
140
+ et_rel='\0\1'
141
+ else
142
+ et_rel='\1\0'
143
+ fi
144
+ printf "${et_rel}" | dd of=${2} conv=notrunc bs=1 seek=16 status=none
145
}
146
147
# Create ${2} .S file with all symbols from the ${1} object file
0 commit comments