1
0
Fork 0
alistair23-linux/init
Arnd Bergmann 070bd3a8ac initramfs: fix clang build failure
[ Upstream commit 55d5b7dd64 ]

There is only one function in init/initramfs.c that is in the .text
section, and it is marked __weak.  When building with clang-12 and the
integrated assembler, this leads to a bug with recordmcount:

  ./scripts/recordmcount  "init/initramfs.o"
  Cannot find symbol for section 2: .text.
  init/initramfs.o: failed

I'm not quite sure what exactly goes wrong, but I notice that this
function is only ever called from an __init function, and normally
inlined.  Marking it __init as well is clearly correct and it leads to
recordmcount no longer complaining.

Link: https://lkml.kernel.org/r/20201204165742.3815221-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Barret Rhoden <brho@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:30 +01:00
..
Kconfig printk: reduce LOG_BUF_SHIFT range for H8300 2020-11-05 11:43:16 +01:00
Makefile Kbuild: Handle PREEMPT_RT for version string and magic 2019-08-14 01:10:42 +09:00
calibrate.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
do_mounts.c vfs: Convert ramfs, shmem, tmpfs, devtmpfs, rootfs to use the new mount API 2019-09-12 21:05:34 -04:00
do_mounts.h fs: add do_mknodat() helper and ksys_mknod() wrapper; remove in-kernel calls to syscall 2018-04-02 20:15:56 +02:00
do_mounts_initrd.c Merge branch 'mount.part1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-01-05 13:25:58 -08:00
do_mounts_md.c init/: remove ineffective sparse disabling 2018-08-22 10:52:49 -07:00
do_mounts_rd.c init/: remove ineffective sparse disabling 2018-08-22 10:52:49 -07:00
init_task.c exec: Add exec_update_mutex to replace cred_guard_mutex 2020-10-01 13:17:47 +02:00
initramfs.c initramfs: fix clang build failure 2020-12-30 11:51:30 +01:00
main.c kprobes: tracing/kprobes: Fix to kill kprobes on initmem after boot 2020-10-01 13:18:23 +02:00
noinitramfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
version.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00