From: matt@console-pimps.org (Matt Fleming)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 4/4] efi: efistub: convert into static library
Date: Wed, 25 Jun 2014 21:34:24 +0100 [thread overview]
Message-ID: <20140625203424.GC15494@console-pimps.org> (raw)
In-Reply-To: <1402931688-23597-4-git-send-email-ard.biesheuvel@linaro.org>
On Mon, 16 Jun, at 05:14:48PM, Ard Biesheuvel wrote:
> This patch changes both x86 and arm64 efistub implementations from #including
> shared .c files under drivers/firmware/efi to building the shared code as a
> static library.
>
> The x86 code uses a stub built into the boot executable which uncompresses the
> kernel at boot time. In this case, the library is linked into the decompressor.
>
> In the arm64 case, the stub is part of the kernel proper so the library is
> linked into the kernel proper as well.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Sorry for the delay in reviewing this.
Conceptually, this is a nice cleanup. Unfortunately, I'm seeing the
following build error,
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `efi_printk':
efi-stub-helper.c:(.text+0x1): undefined reference to `__fentry__'
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `efi_get_memory_map':
efi-stub-helper.c:(.text+0x7f): undefined reference to `__fentry__'
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `efi_high_alloc':
efi-stub-helper.c:(.text+0x1ea): undefined reference to `__fentry__'
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `efi_low_alloc':
efi-stub-helper.c:(.text+0x3dd): undefined reference to `__fentry__'
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `efi_free':
efi-stub-helper.c:(.text+0x59f): undefined reference to `__fentry__'
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o):efi-stub-helper.c:(.text+0x5ec): more undefined references to `__fentry__' follow
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o):(.data+0x260): undefined reference to `__gcov_merge_add'
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `_GLOBAL__sub_I_65535_0_efi_printk':
efi-stub-helper.c:(.text.startup+0xc): undefined reference to `__gcov_init'
make[3]: *** [arch/x86/boot/compressed/vmlinux] Error 1
make[2]: *** [arch/x86/boot/compressed/vmlinux] Error 2
make[1]: *** [bzImage] Error 2
This is because we use different CFLAGS for the EFI boot stub on x86.
Take a look at arch/x86/boot/compressed/Makefile to see what I mean.
What I'd suggest is that you simply update the efi-stub-helper.c
#include path in the x86 EFI boot stub in this series, and only roll out
the awesome new libstub for arm64. I'll take care of doing the necessary
CFLAG munging for x86 when I have some spare time. Could you do a v2?
That is, unless you really want to make it work for x86 ;-)
--
Matt Fleming, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-06-25 20:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 15:14 [RFC PATCH 1/4] efi/x86: efistub: move shared dependencies to <asm/efi.h> Ard Biesheuvel
2014-06-16 15:14 ` [RFC PATCH 2/4] efi/arm64: " Ard Biesheuvel
2014-06-16 15:14 ` [RFC PATCH 3/4] efi: efistub: refactor stub components Ard Biesheuvel
2014-06-16 15:14 ` [RFC PATCH 4/4] efi: efistub: convert into static library Ard Biesheuvel
2014-06-16 15:24 ` Ard Biesheuvel
2014-06-25 20:34 ` Matt Fleming [this message]
2014-06-25 21:26 ` Ard Biesheuvel
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=20140625203424.GC15494@console-pimps.org \
--to=matt@console-pimps.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).