Sean Christopherson
6a3193cdd5
kbuild: lto: Merge module sections if and only if CONFIG_LTO_CLANG is enabled
...
Merge module sections only when using Clang LTO. With ld.bfd, merging
sections does not appear to update the symbol tables for the module,
e.g. 'readelf -s' shows the value that a symbol would have had, if
sections were not merged. ld.lld does not show this problem.
The stale symbol table breaks gdb's function disassembler, and presumably
other things, e.g.
gdb -batch -ex "file arch/x86/kvm/kvm.ko" -ex "disassemble kvm_init"
reads the wrong bytes and dumps garbage.
Fixes: dd2776222abb ("kbuild: lto: merge module sections")
Cc: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210322234438.502582-1-seanjc@google.com
2021-04-01 14:15:59 -07:00
..
2020-11-07 13:20:41 +01:00
2020-08-10 01:32:59 +09:00
2021-02-16 22:23:56 +09:00
2021-02-12 19:23:39 -06:00
2021-03-05 12:12:28 -08:00
2021-03-11 14:52:54 +09:00
2021-03-11 14:40:50 +09:00
2021-02-26 09:41:05 -08:00
2021-02-16 12:01:45 +09:00
2021-02-24 15:12:06 +09:00
2017-03-28 16:16:52 +02:00
2021-02-24 10:25:37 -08:00
2020-11-02 11:31:00 +09:00
2020-08-17 20:42:00 -04:00
2020-12-08 23:30:04 +09:00
2020-09-25 00:36:41 +09:00
2021-02-28 15:22:02 +09:00
2019-05-24 17:27:11 +02:00
2018-07-18 01:18:05 +09:00
2021-01-22 06:34:44 +09:00
2019-06-05 17:37:11 +02:00
2020-12-04 22:32:40 +01:00
2018-06-28 13:36:39 +09:00
2021-02-16 12:01:32 +09:00
2017-11-02 11:10:55 +01:00
2020-02-25 03:35:16 -07:00
2017-11-02 11:10:55 +01:00
2020-08-14 13:30:03 +09:00
2021-02-26 09:41:04 -08:00
2020-05-26 00:03:16 +09:00
2019-02-19 21:27:53 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-12-24 12:59:43 +01:00
2021-01-04 10:38:11 +09:00
2020-10-16 11:11:21 -07:00
2020-08-07 11:33:21 -07:00
2020-10-13 18:38:26 -07:00
2021-01-01 12:26:39 -08:00
2020-09-04 18:19:37 +02:00
2021-01-22 06:34:44 +09:00
2020-04-15 15:13:13 -06:00
2020-03-17 08:59:03 +09:00
2019-06-05 17:37:07 +02:00
2020-08-18 20:16:46 +09:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-06-05 17:37:10 +02:00
2018-11-18 10:15:09 -08:00
2018-03-26 02:01:24 +09:00
2020-01-27 14:25:06 -07:00
2019-01-06 09:46:51 +09:00
2017-11-02 11:10:55 +01:00
2018-06-08 18:56:00 +09:00
2018-06-25 23:21:13 +09:00
2021-02-28 15:19:21 +09:00
2018-12-01 23:13:14 +09:00
2021-01-14 08:21:09 -08:00
2020-12-08 23:30:04 +09:00
2019-05-24 17:36:45 +02:00
2020-12-04 14:34:27 -07:00
2020-10-16 11:11:19 -07:00
2019-05-30 11:26:39 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-08-07 13:29:39 -07:00
2016-02-26 15:30:20 +00:00
2021-02-01 10:37:19 +09:00
2021-02-05 17:53:28 +09:00
2021-02-22 08:22:04 +09:00
2021-02-22 08:22:04 +09:00
2021-02-22 14:20:36 -07:00
2021-03-13 11:12:13 +09:00
2019-05-30 11:26:39 -07:00
2017-11-02 11:10:55 +01:00
2021-02-23 12:46:57 -08:00
2021-02-15 01:54:11 +09:00
2019-03-17 12:56:32 +09:00
2021-02-25 10:17:31 -08:00
2021-02-24 15:12:06 +09:00
2021-02-04 09:00:04 -06:00
2020-12-08 23:30:05 +09:00
2020-06-24 07:48:28 -07:00
2019-11-15 00:23:10 +09:00
2020-08-10 01:32:59 +09:00
2020-09-25 00:36:50 +09:00
2020-08-10 01:32:59 +09:00
2020-10-22 13:13:57 -07:00
2021-03-11 18:22:48 +09:00
2021-02-23 12:46:57 -08:00
2019-07-17 22:39:27 +09:00
2021-01-14 08:21:08 -08:00
2019-07-17 22:39:27 +09:00
2020-06-11 20:14:41 +09:00
2021-02-26 09:41:05 -08:00
2020-05-17 18:52:01 +09:00
2017-11-02 11:10:55 +01:00
2019-06-05 17:37:10 +02:00
2020-10-21 00:46:04 +09:00
2019-08-29 23:54:29 +09:00
2020-06-06 23:39:20 +09:00
2017-11-02 11:10:55 +01:00
2021-04-01 14:15:59 -07:00
2020-05-26 00:03:16 +09:00
2020-12-12 18:31:29 +01:00
2019-05-30 11:29:23 -07:00
2020-03-26 15:08:27 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2021-03-02 17:27:18 -05:00
2020-06-16 21:21:00 -04:00
2021-02-13 11:42:40 -08:00
2020-09-25 02:28:12 +09:00
2020-12-08 23:30:04 +09:00
2017-02-10 12:43:47 +11:00
2020-07-20 10:55:50 +02:00
2019-12-13 10:47:58 +01:00
2018-12-28 12:11:44 -08:00
2021-01-27 14:50:12 +01:00
2021-02-24 13:38:26 -08:00
2021-02-01 17:17:14 -07:00
2020-12-08 23:30:04 +09:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-09-05 08:12:09 -06:00
2021-02-22 08:22:04 +09:00
2021-02-22 08:22:03 +09:00
2020-10-09 08:55:17 +02:00
2021-02-16 12:01:45 +09:00
2019-11-13 10:52:05 +00:00
2018-11-30 14:45:01 -08:00
2021-01-27 14:54:42 +01:00
2017-11-02 11:10:55 +01:00
2020-06-06 23:42:01 +09:00