linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] efi/libstub/arm64: link stub lib.a conditionally
@ 2020-06-04  2:20 Masahiro Yamada
  2020-06-10  7:58 ` Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2020-06-04  2:20 UTC (permalink / raw)
  To: Ard Biesheuvel, linux-efi
  Cc: Catalin Marinas, Masahiro Yamada, Will Deacon, linux-kernel,
	linux-arm-kernel

Since commit 799c43415442 ("kbuild: thin archives make default for
all archs"), core-y is passed to the linker with --whole-archive.
Hence, the whole of stub library is linked to vmlinux.

Use libs-y so that lib.a is passed after --no-whole-archive for
conditional linking.

The unused drivers/firmware/efi/libstub/relocate.o will be dropped
for ARCH=arm64.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

This patch touches under arch/arm64/, but
this is more related to efi.
I am sending this to Ard.

 arch/arm64/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 650e1185c190..48a6afa774fc 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -145,7 +145,7 @@ export	TEXT_OFFSET
 
 core-y		+= arch/arm64/
 libs-y		:= arch/arm64/lib/ $(libs-y)
-core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
+libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
 
 # Default target when executing plain make
 boot		:= arch/arm64/boot
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/2] efi/libstub/arm64: link stub lib.a conditionally
  2020-06-04  2:20 [PATCH v2 1/2] efi/libstub/arm64: link stub lib.a conditionally Masahiro Yamada
@ 2020-06-10  7:58 ` Will Deacon
  2020-06-10  8:00   ` Ard Biesheuvel
  0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2020-06-10  7:58 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Catalin Marinas, linux-efi, Ard Biesheuvel, linux-arm-kernel,
	linux-kernel

On Thu, Jun 04, 2020 at 11:20:30AM +0900, Masahiro Yamada wrote:
> Since commit 799c43415442 ("kbuild: thin archives make default for
> all archs"), core-y is passed to the linker with --whole-archive.
> Hence, the whole of stub library is linked to vmlinux.
> 
> Use libs-y so that lib.a is passed after --no-whole-archive for
> conditional linking.
> 
> The unused drivers/firmware/efi/libstub/relocate.o will be dropped
> for ARCH=arm64.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
> This patch touches under arch/arm64/, but
> this is more related to efi.
> I am sending this to Ard.

Ok, I'll ignore this then. Ard -- please yell if you want me to do anything
else with it.

Will


> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 650e1185c190..48a6afa774fc 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -145,7 +145,7 @@ export	TEXT_OFFSET
>  
>  core-y		+= arch/arm64/
>  libs-y		:= arch/arm64/lib/ $(libs-y)
> -core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
> +libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
>  
>  # Default target when executing plain make
>  boot		:= arch/arm64/boot
> -- 
> 2.25.1
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/2] efi/libstub/arm64: link stub lib.a conditionally
  2020-06-10  7:58 ` Will Deacon
@ 2020-06-10  8:00   ` Ard Biesheuvel
  2020-06-10  8:42     ` Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Ard Biesheuvel @ 2020-06-10  8:00 UTC (permalink / raw)
  To: Will Deacon
  Cc: Catalin Marinas, Masahiro Yamada, linux-efi,
	Linux Kernel Mailing List, Linux ARM

On Wed, 10 Jun 2020 at 09:58, Will Deacon <will@kernel.org> wrote:
>
> On Thu, Jun 04, 2020 at 11:20:30AM +0900, Masahiro Yamada wrote:
> > Since commit 799c43415442 ("kbuild: thin archives make default for
> > all archs"), core-y is passed to the linker with --whole-archive.
> > Hence, the whole of stub library is linked to vmlinux.
> >
> > Use libs-y so that lib.a is passed after --no-whole-archive for
> > conditional linking.
> >
> > The unused drivers/firmware/efi/libstub/relocate.o will be dropped
> > for ARCH=arm64.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> > This patch touches under arch/arm64/, but
> > this is more related to efi.
> > I am sending this to Ard.
>
> Ok, I'll ignore this then. Ard -- please yell if you want me to do anything
> else with it.
>

I am going to send a batch of EFI fixes early next week, so I can take
this as well, or alternatively, you can apply it directly.

>
> > diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> > index 650e1185c190..48a6afa774fc 100644
> > --- a/arch/arm64/Makefile
> > +++ b/arch/arm64/Makefile
> > @@ -145,7 +145,7 @@ export    TEXT_OFFSET
> >
> >  core-y               += arch/arm64/
> >  libs-y               := arch/arm64/lib/ $(libs-y)
> > -core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
> > +libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
> >
> >  # Default target when executing plain make
> >  boot         := arch/arm64/boot
> > --
> > 2.25.1
> >

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/2] efi/libstub/arm64: link stub lib.a conditionally
  2020-06-10  8:00   ` Ard Biesheuvel
@ 2020-06-10  8:42     ` Will Deacon
  0 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2020-06-10  8:42 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Catalin Marinas, Masahiro Yamada, linux-efi,
	Linux Kernel Mailing List, Linux ARM

On Wed, Jun 10, 2020 at 10:00:19AM +0200, Ard Biesheuvel wrote:
> On Wed, 10 Jun 2020 at 09:58, Will Deacon <will@kernel.org> wrote:
> >
> > On Thu, Jun 04, 2020 at 11:20:30AM +0900, Masahiro Yamada wrote:
> > > Since commit 799c43415442 ("kbuild: thin archives make default for
> > > all archs"), core-y is passed to the linker with --whole-archive.
> > > Hence, the whole of stub library is linked to vmlinux.
> > >
> > > Use libs-y so that lib.a is passed after --no-whole-archive for
> > > conditional linking.
> > >
> > > The unused drivers/firmware/efi/libstub/relocate.o will be dropped
> > > for ARCH=arm64.
> > >
> > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > > ---
> > >
> > > This patch touches under arch/arm64/, but
> > > this is more related to efi.
> > > I am sending this to Ard.
> >
> > Ok, I'll ignore this then. Ard -- please yell if you want me to do anything
> > else with it.
> >
> 
> I am going to send a batch of EFI fixes early next week, so I can take
> this as well, or alternatively, you can apply it directly.

No, please take it. Just wanted to make sure it didn't slip through the
cracks, that's all.

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-10  8:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-04  2:20 [PATCH v2 1/2] efi/libstub/arm64: link stub lib.a conditionally Masahiro Yamada
2020-06-10  7:58 ` Will Deacon
2020-06-10  8:00   ` Ard Biesheuvel
2020-06-10  8:42     ` Will Deacon

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).