android_kernel_sony_sdm845/scripts
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Fangrui Song 41cc72a0d5 BACKPORT: bpf: Support llvm-objcopy for vmlinux BTF
commit 90ceddcb495008ac8ba7a3dce297841efcd7d584 upstream.

Simplify gen_btf logic to make it work with llvm-objcopy. The existing
'file format' and 'architecture' parsing logic is brittle and does not
work with llvm-objcopy/llvm-objdump.

'file format' output of llvm-objdump>=11 will match GNU objdump, but
'architecture' (bfdarch) may not.

.BTF in .tmp_vmlinux.btf is non-SHF_ALLOC. Add the SHF_ALLOC flag
because it is part of vmlinux image used for introspection. C code
can reference the section via linker script defined __start_BTF and
__stop_BTF. This fixes a small problem that previous .BTF had the
SHF_WRITE flag (objcopy -I binary -O elf* synthesized .data).

Additionally, `objcopy -I binary` synthesized symbols
_binary__btf_vmlinux_bin_start and _binary__btf_vmlinux_bin_stop (not
used elsewhere) are replaced with more commonplace __start_BTF and
__stop_BTF.

Add 2>/dev/null because GNU objcopy (but not llvm-objcopy) warns
"empty loadable segment detected at vaddr=0xffffffff81000000, is this intentional?"

We use a dd command to change the e_type field in the ELF header from
ET_EXEC to ET_REL so that lld will accept .btf.vmlinux.bin.o.  Accepting
ET_EXEC as an input file is an extremely rare GNU ld feature that lld
does not intend to support, because this is error-prone.

The output section description .BTF in include/asm-generic/vmlinux.lds.h
avoids potential subtle orphan section placement issues and suppresses
--orphan-handling=warn warnings.

Fixes: df786c9b9476 ("bpf: Force .BTF section start to zero when dumping from vmlinux")
Fixes: cb0cc635c7a9 ("powerpc: Include .BTF section")
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Change-Id: I145b50cfe3e0e1e034fb750cf55642905382a06c
Signed-off-by: Fangrui Song <maskray@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Stanislav Fomichev <sdf@google.com>
Tested-by: Andrii Nakryiko <andriin@fb.com>
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Link: https://github.com/ClangBuiltLinux/linux/issues/871
Link: https://lore.kernel.org/bpf/20200318222746.173648-1-maskray@google.com
Signed-off-by: Maria Teguiani <teguiani@google.com>
Tested-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sorayukii <sorayukii69@gmail.com>
2026-05-15 17:58:11 +07:00
..
basic fixdep: faster CONFIG_ search 2016-08-24 22:34:19 +02:00
coccinelle fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock 2019-06-11 12:22:49 +02:00
dtc Merge remote-tracking branch 'common/android-4.9-q' into android12-4.9-sdm845 2022-03-31 22:52:51 +03:00
gcc-plugins gcc-plugins: latent_entropy: use /dev/urandom 2022-04-20 09:06:46 +02:00
gdb scripts/gdb: fix lx-version string output 2021-01-12 19:49:03 +01:00
genksyms kbuild: Regenerate genksyms lexer 2016-08-25 20:03:51 +02:00
kconfig kconfig/lxdialog: Make main() return 0 2024-10-09 17:15:11 +03:00
ksymoops
mod This is the 4.9.321 stable release 2022-07-03 10:09:05 +02:00
package builddeb: Fix header package regarding dtc source links 2018-05-30 07:50:39 +02:00
selinux selinux: use "grep -E" instead of "egrep" 2022-10-26 13:15:38 +02:00
tracing scripts/tracing: fix the bug that can't parse raw_trace_func 2021-08-15 13:01:03 +02:00
.gitignore
adjust_autoksyms.sh kbuild: make scripts/adjust_autoksyms.sh robust against timestamp races 2018-05-30 07:50:37 +02:00
analyze_suspend.py tweewide: Fix most Shebang lines 2021-06-03 08:23:27 +02:00
asn1_compiler.c
bloat-o-meter scripts: switch explicitly to Python 3 2021-06-03 08:23:27 +02:00
bootgraph.pl tweewide: Fix most Shebang lines 2021-06-03 08:23:27 +02:00
bpf_helpers_doc.py BACKPORT: bpf: add script and prepare bpf.h for new helpers documentation 2026-05-15 17:56:21 +07:00
build-all.py scripts: build-all.py: set clang as REAL_CC for arm 2020-02-27 21:25:17 -08:00
check-config-debug-exemptions scripts: snapshot of kernel build utility scripts 2016-08-08 15:22:37 -07:00
check-config-perf-exemptions scripts: snapshot of kernel build utility scripts 2016-08-08 15:22:37 -07:00
check-config.py scripts: snapshot of kernel build utility scripts 2016-08-08 15:22:37 -07:00
check-lc_ctype.c
check_extable.sh
checkincludes.pl tweewide: Fix most Shebang lines 2021-06-03 08:23:27 +02:00
checkkconfigsymbols.py checkkconfigsymbols: use arglist instead of cmd string 2016-08-28 11:08:34 +02:00
checkpatch.pl Merge tag 'LA.UM.10.3.r1-01000-sdm845.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.9 into android12-4.9-sdm845 2022-03-31 20:16:10 +03:00
checkstack.pl tweewide: Fix most Shebang lines 2021-06-03 08:23:27 +02:00
checksyscalls.sh
checkversion.pl
clang-android.sh ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple 2018-11-28 17:35:40 -08:00
clang-version.sh FROMLIST: kbuild: add clang-version.sh 2018-02-28 15:09:57 -08:00
cleanfile
cleanpatch
coccicheck coccinelle: fix parallel build with CHECK=scripts/coccicheck 2017-12-14 09:28:22 +01:00
config tweewide: Fix most Shebang lines 2021-06-03 08:23:27 +02:00
conmakehash.c
const_structs.checkpatch const_structs.checkpatch: remove drm_connector from the list 2018-02-04 21:39:49 -08:00
decode_stacktrace.sh scripts/decode_stacktrace: strip basepath from all paths 2020-07-31 16:44:03 +02:00
decodecode scripts/decodecode: fix trapping instruction formatting 2020-05-20 08:15:29 +02:00
depmod.sh depmod: handle the case of /sbin/depmod without /sbin in PATH 2021-01-12 19:49:01 +01:00
diffconfig scripts: switch explicitly to Python 3 2021-06-03 08:23:27 +02:00
docproc.c docproc: print a comment about autogeneration for rst output 2016-05-14 09:56:56 -06:00
export_report.pl
extract-cert.c cert host tools: Stop complaining about deprecated OpenSSL functions 2022-11-25 17:35:37 +01:00
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
extract_xc3028.pl tweewide: Fix most Shebang lines 2021-06-03 08:23:27 +02:00
faddr2line scripts/faddr2line: improve on base path filtering a bit 2016-09-19 14:49:08 -07:00
gcc-goto.sh
gcc-ld
gcc-plugin.sh gcc-plugins: abort builds cleanly when not supported 2016-08-08 17:49:05 -07:00
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh scripts/has-stack-protector: add -fno-PIE 2016-11-09 22:28:05 +01:00
gen_initramfs_list.sh initramfs: Escape colons in depfile 2016-09-23 10:35:32 +02:00
get_dvb_firmware tweewide: Fix most Shebang lines 2021-06-03 08:23:27 +02:00
get_maintainer.pl get_maintainer: quiet noisy implicit -f vcs_file_exists checking 2016-08-26 17:39:34 -07:00
gfp-translate
headerdep.pl
headers.sh
headers_check.pl headers_check: don't warn about c++ guards 2016-05-24 14:12:48 +10:00
headers_install.sh
insert-sys-cert.c
kallsyms.c scripts/kallsyms: remove redundant is_arm_mapping_symbol() 2026-05-15 17:48:21 +07:00
Kbuild.include arm64: build with baremetal linker target instead of Linux when available 2022-10-13 01:53:43 +03:00
kernel-doc scripts/kernel-doc: Don't fail with status != 0 if error encountered with -none 2018-02-25 11:05:47 +01:00
kernel-doc-xml-ref
ld-version.sh ld-version: Drop the 4th and 5th version components 2016-05-13 14:02:05 +02:00
Lindent
link-vmlinux.sh BACKPORT: bpf: Support llvm-objcopy for vmlinux BTF 2026-05-15 17:58:11 +07:00
Makefile scripts: set proper OpenSSL include dir also for sign-file 2021-03-07 11:25:55 +01:00
Makefile.asm-generic kbuild: replace genhdr-y with generated-y 2020-04-09 15:53:27 +05:30
Makefile.build Merge branch 'android-4.9-q' of https://android.googlesource.com/kernel/common into lineage-18.1-caf-sdm845 2021-04-26 01:27:02 +03:00
Makefile.clean ANDROID: kbuild: Makefile.clean: make Kbuild and Makefile optional 2017-01-27 13:52:26 -08:00
Makefile.dtbinst
Makefile.dtbo scripts: Makefile: Add multi overlay dtbo-base apply verify 2017-11-24 16:56:41 +08:00
Makefile.extrawarn Makefile.extrawarn: Move -Wcast-function-type-strict to W=1 2022-10-26 13:15:33 +02:00
Makefile.fwinst
Makefile.gcc-plugins gcc-plugins: Add latent_entropy plugin 2016-10-10 14:51:44 -07:00
Makefile.headersinst kbuild: skip install/check of headers right under uapi directories 2020-04-09 16:19:34 +05:30
Makefile.help
Makefile.host kbuild: use HOSTLDFLAGS for single .c executables 2022-10-13 01:53:40 +03:00
Makefile.kasan This is the 4.9.121 stable release 2018-08-17 21:31:08 +02:00
Makefile.lib dtc: Silence warnings 2022-10-13 01:53:45 +03:00
Makefile.modbuiltin
Makefile.modinst ANDROID: kbuild: make it possible to specify the module output dir 2017-01-27 13:52:26 -08:00
Makefile.modpost This is the 4.9.327 stable release 2022-09-05 14:02:59 +02:00
Makefile.modsign
Makefile.ubsan Kbuild: enable -Wmaybe-uninitialized warning for "make W=1" 2016-11-11 08:45:08 -08:00
makelst
markup_oops.pl tweewide: Fix most Shebang lines 2021-06-03 08:23:27 +02:00
mkcompile_h scripts: Support a custom compiler name 2026-05-15 17:48:21 +07:00
mkmakefile
mksysmap mksysmap: Fix the mismatch of '.L' symbols in System.map 2020-06-30 15:38:23 -04:00
mkuboot.sh
mkversion
module-common.lds objtool, modules: Discard objtool annotation sections for modules 2018-01-17 09:38:58 +01:00
namespace.pl namespace: fix namespace.pl script to support relative paths 2019-10-29 09:15:06 +01:00
objdiff
patch-kernel
pnmtologo.c
profile2linkerlist.pl tweewide: Fix most Shebang lines 2021-06-03 08:23:27 +02:00
prune-kernel
recordmcount.c This is the 4.9.262 stable release 2021-03-17 17:12:54 +01:00
recordmcount.h recordmcount: Fix spurious mcount entries on powerpc 2019-08-04 09:33:38 +02:00
recordmcount.pl recordmcount.pl: fix typo in s390 mcount regex 2022-01-05 12:31:24 +01:00
setlocalversion script: Do not append a plus behind the localversion 2026-05-15 17:48:21 +07:00
show_delta tweewide: Fix most Shebang lines 2021-06-03 08:23:27 +02:00
sign-file.c cert host tools: Stop complaining about deprecated OpenSSL functions 2022-11-25 17:35:37 +01:00
sortextable.c
sortextable.h
spelling.txt spelling.txt: "modeled" is spelt correctly 2016-10-07 18:46:30 -07:00
stackdelta tweewide: Fix most Shebang lines 2021-06-03 08:23:27 +02:00
stackusage
tags.sh BACKPORT: mm: split page_type out from _mapcount 2026-05-15 17:57:58 +07:00
unifdef.c unifdef: use memcpy instead of strncpy 2018-12-08 13:05:05 +01:00
ver_linux ver_linux: rename ver_linux.awk to ver_linux 2016-08-31 13:59:31 +02:00
xen-hypercalls.sh
xz_wrap.sh