exynos-linux-stable/scripts
Nick Desaulniers 2c6dc3d015
ANDROID: modpost: filter function/data section ldflags
The previous addition of -plugin-opt=-function-sections and
-plugin-opt=-data-sections to LDFLAGS when performing LTO with gold was
causing kernel modules to have individual sections for functions and
data. This means that rather than having multiple symbols in the
standard .text, .bss, and .data sections, there were now tens of
thousands of sections, each with one symbol. This was problematic for
third party tools used for parsing ramdumps that expect to find symbols
in the standard object layout.

This patch filters out these flags from LDFLAGS when constructing
modules.

Modules are linked in two phases with LTO.
1. produces <module>.lto.o
2. produces <module>.ko

We must not use these flags during BOTH links otherwise these objects
will have individual function and data sections.  Running `readelf -S`
on the above two files should show a number of sections in the order of
tens (vs. tens of thousands) for the tooling to work properly.

A more robust solution may be to look into is fixing the tooling to work
with function and data section object layouts, but this should fix the
tooling to work with the previous object layout for now.

Bug: 116819139
Bug: 119467548
Bug: 120503084
Change-Id: I2a388f42d5e460654de9cbd0b37dae4463bbb73e
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Rapherion Rollerscaperers <rapherion@raphielgang.org>
2023-04-30 22:07:43 +03: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
crypto scripts: crypto: adjust python scripts permissions to 0755 2020-03-19 15:24:22 +02:00
dtbtool_exynos treewide: fix build with clang 2023-02-21 00:11:01 +03:00
dtc Merge 4.9.218 branch 'android-4.9-q' into tw10-android-4.9-q 2020-04-09 17:15:01 +03:00
fmp defconfig : setup 2023-02-21 00:09:32 +03:00
gcc-plugins gcc-plugins: Fix build failures under Darwin host 2019-06-11 12:22:43 +02:00
gdb scripts/gdb: fix debugging modules compiled with hot/cold partitioning 2019-12-05 15:34:10 +01:00
genksyms scripts/genksyms: add missing include for UINT8_MAX + 2023-02-21 00:15:26 +03:00
kconfig kconfig: fix broken dependency in randconfig-generated .config 2020-02-28 15:42:22 +01:00
ksymoops
mod This is the 4.9.207 stable release 2019-12-21 11:28:16 +01:00
package builddeb: Fix header package regarding dtc source links 2018-05-30 07:50:39 +02:00
rkp_cfp scripts/rkp_cfp: Don't attempt to use ccache for instrumentation 2023-02-21 00:09:27 +03:00
selinux selinux: explicitly declare the role "base_r" 2015-07-13 13:32:00 -04:00
tracing ftrace/scripts: Add helper script to bisect function tracing problem functions 2016-09-21 13:56:55 -04:00
.gitignore KEYS: Reserve an extra certificate symbol for inserting without recompiling 2016-02-26 15:30:20 +00:00
adjust_autoksyms.sh kbuild: make scripts/adjust_autoksyms.sh robust against timestamp races 2018-05-30 07:50:37 +02:00
analyze_suspend.py PM / tools: scripts: AnalyzeSuspend v4.2 2016-07-15 23:34:14 +02:00
android-major-version.sh import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
android-version.sh import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
asn1_compiler.c ASN.1: fix open failure check on headername 2016-04-06 14:06:48 +01:00
bloat-o-meter scripts/bloat-o-meter: fix SIGPIPE 2016-11-11 08:12:37 -08:00
bootgraph.pl kbuild: Make scripts executable 2014-08-20 16:03:45 +02:00
check-lc_ctype.c DocBook: Use a fixed encoding for output 2015-09-28 01:31:48 -06:00
check_extable.sh scripts: add check_extable.sh script. 2015-04-13 21:03:02 +09:30
checkincludes.pl
checkkconfigsymbols.py checkkconfigsymbols: use arglist instead of cmd string 2016-08-28 11:08:34 +02:00
checkpatch.pl Merge 4.9.212 branch 'android-4.9-q' into tw10-android-4.9-q 2020-02-12 12:32:38 +02:00
checkstack.pl scripts/checkstack.pl: Fix arm64 wrong or unknown architecture 2019-07-10 09:55:31 +02:00
checksyscalls.sh x86/asm/entry: Move the arch/x86/syscalls/ definitions to arch/x86/entry/syscalls/ 2015-06-04 07:37:37 +02:00
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 kbuild: trivial - remove trailing empty lines 2014-06-10 00:04:06 +02:00
conmakehash.c kbuild: trivial - remove trailing spaces 2014-04-30 17:34:32 +02:00
const_structs.checkpatch const_structs.checkpatch: add frequently used from Julia Lawall's list 2016-10-11 15:06:30 -07:00
decode_stacktrace.sh scripts/decode_stacktrace: match basepath using shell prefix operator, not regex 2019-09-16 08:19:33 +02:00
decodecode scripts/decodecode: make faulting insn ptr more robust 2013-04-29 15:54:27 -07:00
depmod.sh kbuild: make missing $DEPMOD a Warning instead of an Error 2018-09-15 09:43:01 +02:00
diffconfig vfs,ext2: remove CONFIG_EXT2_FS_XIP and rename CONFIG_FS_XIP to CONFIG_FS_DAX 2015-02-16 17:56:04 -08:00
docproc.c docproc: print a comment about autogeneration for rst output 2016-05-14 09:56:56 -06:00
export_report.pl kbuild: Make scripts executable 2014-08-20 16:03:45 +02:00
extract-cert.c KEYS: Remove unnecessary header #inclusions from extract-cert.c 2015-09-25 16:31:45 +01:00
extract-ikconfig scripts/extract-ikconfig: Support LZ4-compressed images. 2015-04-15 14:01:12 +02:00
extract-module-sig.pl KEYS: Provide a script to extract a module signature 2015-10-21 15:18:36 +01:00
extract-sys-certs.pl KEYS: Use the symbol value for list size, updated by scripts/insert-sys-cert 2016-02-26 15:32:05 +00:00
extract-vmlinux
extract_xc3028.pl [media] extract_xc3028.pl: move it to scripts/dir 2016-07-17 14:08:12 -03:00
faddr2line scripts/faddr2line: improve on base path filtering a bit 2016-09-19 14:49:08 -07:00
find_matching_major.sh import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
find_matching_version.sh import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
fix_patch.sh import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
gcc-goto.sh kbuild: Make scripts executable 2014-08-20 16:03:45 +02:00
gcc-ld kbuild: Make scripts executable 2014-08-20 16:03:45 +02:00
gcc-plugin.sh gcc-plugins: abort builds cleanly when not supported 2016-08-08 17:49:05 -07:00
gcc-version.sh kbuild: Make scripts executable 2014-08-20 16:03:45 +02:00
gcc-x86_32-has-stack-protector.sh kbuild: Make scripts executable 2014-08-20 16:03:45 +02:00
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 [media] doc-rst: move DVB avulse docs to Documentation/media 2016-07-17 14:02:45 -03: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 CRIS: Fix headers_install 2014-12-20 00:01:12 +01:00
headers_check.pl headers_check: don't warn about c++ guards 2016-05-24 14:12:48 +10:00
headers_install.sh Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-10-14 09:22:26 +02:00
insert-sys-cert.c KEYS: Reserve an extra certificate symbol for inserting without recompiling 2016-02-26 15:30:20 +00:00
kallsyms.c ANDROID: kallsyms: increase KSYM_NAME_LEN 2023-02-21 00:16:35 +03:00
Kbuild.include ANDROID: scripts/Kbuild: avoid <<< for dash shell 2023-04-30 22:07: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 scripts/kernel-doc: Adding cross-reference links to html documentation. 2015-08-16 22:11:16 -06:00
ld-version.sh ld-version: Drop the 4th and 5th version components 2016-05-13 14:02:05 +02:00
Lindent scripts/Lindent: handle missing indent gracefully 2015-09-04 16:54:41 -07:00
link-vmlinux.sh import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
Makefile Introduce Exynos dtbtool to the Linux build system 2020-02-12 12:34:31 +02:00
Makefile.asm-generic kbuild: Remove stale asm-generic wrappers 2016-07-07 15:58:45 +02:00
Makefile.build kbuild: Add support to generate LLVM assembly files 2018-11-23 08:20:35 +01:00
Makefile.clean ANDROID: kbuild: Makefile.clean: make Kbuild and Makefile optional 2017-01-27 13:52:26 -08:00
Makefile.dtbinst import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
Makefile.extrawarn kbuild: Disable -Wpointer-to-enum-cast 2020-04-02 17:20:27 +02:00
Makefile.fwinst kbuild: include $(src)/Makefile rather than $(obj)/Makefile 2015-04-02 16:42:08 +02:00
Makefile.gcc-plugins gcc-plugins: Add latent_entropy plugin 2016-10-10 14:51:44 -07:00
Makefile.headersinst kbuild: collect shorthands into scripts/Kbuild.include 2014-11-26 14:36:52 +01:00
Makefile.help
Makefile.host kbuild: use HOSTLDFLAGS for single .c executables 2023-02-21 00:16:36 +03:00
Makefile.kasan Merge 4.9.212 branch 'android-4.9-q' into tw10-android-4.9-q 2020-02-12 12:32:38 +02:00
Makefile.lib Introduce Exynos dtbtool to the Linux build system 2020-02-12 12:34:31 +02: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 ANDROID: modpost: filter function/data section ldflags 2023-04-30 22:07:43 +03:00
Makefile.modsign modsign: lookup lines ending in .ko in .mod files 2014-08-27 21:54:11 +09:30
Makefile.ubsan import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
makelst
markup_oops.pl kbuild: Make scripts executable 2014-08-20 16:03:45 +02:00
mkcompile_h kbuild: trivial - remove trailing spaces 2014-04-30 17:34:32 +02:00
mkmakefile kbuild: Make scripts executable 2014-08-20 16:03:45 +02:00
mksysmap mksysmap: Add h8300 local symbol pattern 2015-06-23 13:35:47 +09:00
mkuboot.sh
mkversion
module-common.lds objtool, modules: Discard objtool annotation sections for modules 2018-01-17 09:38:58 +01:00
module-lto.lds ANDROID: kbuild: merge module sections with LTO 2023-04-30 22:07:39 +03:00
namespace.pl namespace: fix namespace.pl script to support relative paths 2019-10-29 09:15:06 +01:00
objdiff scripts: objdiff: support directories for the augument of record command 2014-06-10 14:59:33 +02:00
patch-kernel kbuild: trivial - remove trailing spaces 2014-04-30 17:34:32 +02:00
pnmtologo.c kbuild: trivial - remove trailing empty lines 2014-06-10 00:04:06 +02:00
profile2linkerlist.pl kbuild: Make scripts executable 2014-08-20 16:03:45 +02:00
prune-kernel scripts: add "prune-kernel" script to clean up old kernel images 2016-02-09 10:09:52 -08:00
recordmcount.c This is the 4.9.212 stable release 2020-01-29 10:47:55 +01:00
recordmcount.h recordmcount: Fix spurious mcount entries on powerpc 2019-08-04 09:33:38 +02:00
recordmcount.pl nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
replace_dir.sh import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
setlocalversion Remove + from kernel name 2023-02-21 00:09:14 +03:00
show_delta kbuild: trivial - remove trailing empty lines 2014-06-10 00:04:06 +02:00
sign-file.c modsign: Make sign-file determine the format of the X.509 cert 2016-06-14 13:18:33 +01:00
sortextable.c parisc: Use generic extable search and sort routines 2016-03-23 16:00:46 +01:00
sortextable.h scripts/sortextable: suppress warning: `relocs_size' may be used uninitialized 2014-10-14 02:18:23 +02:00
spelling.txt spelling.txt: "modeled" is spelt correctly 2016-10-07 18:46:30 -07:00
stackdelta scripts: add stackdelta script 2015-08-28 17:04:40 +02:00
stackusage scripts: add stackusage script 2015-08-28 17:04:40 +02:00
tags.sh tags: honor COMPILED_SOURCE with apart output directory 2018-04-13 19:48:21 +02: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 xen: build infrastructure for generating hypercall depending symbols 2015-03-16 14:49:13 +00:00
xz_wrap.sh kbuild: Make scripts executable 2014-08-20 16:03:45 +02:00