From: Kees Cook <kees@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [linux-next:master 12136/12319] drivers/firmware/dmi_scan.c:692: undefined reference to `efi'
Date: Sun, 27 Jul 2025 23:04:12 -0700 [thread overview]
Message-ID: <202507272255.50254C0C@keescook> (raw)
In-Reply-To: <202507270258.neWuiXLd-lkp@intel.com>
On Sun, Jul 27, 2025 at 03:04:55AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: d7af19298454ed155f5cf67201a70f5cf836c842
> commit: 1ad483981776ff67e2b37bb6951412e608c55adb [12136/12319] init.h: Disable sanitizer coverage for __init and __head
> config: x86_64-randconfig-077-20250726 (https://download.01.org/0day-ci/archive/20250727/202507270258.neWuiXLd-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250727/202507270258.neWuiXLd-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202507270258.neWuiXLd-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> ld: vmlinux.o: in function `setup_arch':
> arch/x86/kernel/setup.c:987: undefined reference to `efi_init'
> ld: arch/x86/kernel/setup.c:971: undefined reference to `efi_memblock_x86_reserve_range'
> ld: vmlinux.o: in function `ms_hyperv_init_platform':
> arch/x86/kernel/cpu/mshyperv.c:496: undefined reference to `isolation_type_tdx'
> ld: arch/x86/kernel/cpu/mshyperv.c:494: undefined reference to `isolation_type_snp'
> ld: vmlinux.o: in function `acpi_os_get_root_pointer':
> drivers/acpi/osl.c:210: undefined reference to `efi'
> ld: drivers/acpi/osl.c:210: undefined reference to `efi'
> ld: drivers/acpi/osl.c:212: undefined reference to `efi'
> ld: drivers/acpi/osl.c:212: undefined reference to `efi'
> ld: vmlinux.o: in function `dmi_scan_machine':
> >> drivers/firmware/dmi_scan.c:692: undefined reference to `efi'
> ld: vmlinux.o:drivers/firmware/dmi_scan.c:692: more undefined references to `efi' follow
This looks like a GCC bug that was fixed after GCC 12.
All the efi references are present even though CONFIG_EFI is not set in
the .config (all the checks are already wrapped in efi_enabled() calls,
which _should_ get DCEd by the compiler and leave no references to "efi"
nor "efi_init" behind.
i.e., with gcc 12:
$ nm gcc-bug/drivers/firmware/dmi_scan.o |grep efi
U efi
with gcc (Ubuntu 14.2.0-19ubuntu2) 14.2.0:
$ nm gcc-bug/drivers/firmware/dmi_scan.o |grep efi | wc -l
0
--
Kees Cook
next prev parent reply other threads:[~2025-07-28 6:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-26 19:04 [linux-next:master 12136/12319] drivers/firmware/dmi_scan.c:692: undefined reference to `efi' kernel test robot
2025-07-28 6:04 ` Kees Cook [this message]
2025-07-28 7:53 ` Philip Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202507272255.50254C0C@keescook \
--to=kees@kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.