diff mbox series

[1/2] kbuild: add OBJSIZE variable for the size tool

Message ID patch-1.thread-2257a1.git-188f5a3d81d5.your-ad-here.call-01565088755-ext-5120@work.hours (mailing list archive)
State New, archived
Headers show
Series [1/2] kbuild: add OBJSIZE variable for the size tool | expand

Commit Message

Vasily Gorbik Aug. 6, 2019, 10:56 a.m. UTC
Define and export OBJSIZE variable for "size" tool from binutils to be
used in architecture specific Makefiles (naming the variable just "SIZE"
would be too risky). In particular this tool is useful to perform checks
that early boot code is not using bss section (which might have not been
zeroed yet or intersects with initrd or other files boot loader might
have put right after the linux kernel).

Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
---
 Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Masahiro Yamada Aug. 7, 2019, 2:32 a.m. UTC | #1
Hi.

On Tue, Aug 6, 2019 at 7:56 PM Vasily Gorbik <gor@linux.ibm.com> wrote:
>
> Define and export OBJSIZE variable for "size" tool from binutils to be
> used in architecture specific Makefiles (naming the variable just "SIZE"
> would be too risky). In particular this tool is useful to perform checks
> that early boot code is not using bss section (which might have not been
> zeroed yet or intersects with initrd or other files boot loader might
> have put right after the linux kernel).
>
> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

I think you want to apply both to the s390 tree. If so,

Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Thanks.

> ---
>  Makefile | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index fa0fbe7851ea..ff4cff29fe46 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -419,6 +419,7 @@ NM          = $(CROSS_COMPILE)nm
>  STRIP          = $(CROSS_COMPILE)strip
>  OBJCOPY                = $(CROSS_COMPILE)objcopy
>  OBJDUMP                = $(CROSS_COMPILE)objdump
> +OBJSIZE                = $(CROSS_COMPILE)size
>  PAHOLE         = pahole
>  LEX            = flex
>  YACC           = bison
> @@ -474,9 +475,9 @@ KBUILD_LDFLAGS :=
>  GCC_PLUGINS_CFLAGS :=
>
>  export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
> -export CPP AR NM STRIP OBJCOPY OBJDUMP PAHOLE KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS
> -export MAKE LEX YACC AWK INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
> -export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
> +export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE PAHOLE LEX YACC AWK INSTALLKERNEL
> +export PERL PYTHON PYTHON2 PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
> +export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE
>
>  export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS
>  export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
> --
> 2.21.0
>
Vasily Gorbik Aug. 7, 2019, 8:01 a.m. UTC | #2
On Wed, Aug 07, 2019 at 11:32:04AM +0900, Masahiro Yamada wrote:
> Hi.
> 
> On Tue, Aug 6, 2019 at 7:56 PM Vasily Gorbik <gor@linux.ibm.com> wrote:
> >
> > Define and export OBJSIZE variable for "size" tool from binutils to be
> > used in architecture specific Makefiles (naming the variable just "SIZE"
> > would be too risky). In particular this tool is useful to perform checks
> > that early boot code is not using bss section (which might have not been
> > zeroed yet or intersects with initrd or other files boot loader might
> > have put right after the linux kernel).
> >
> > Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
> 
> I think you want to apply both to the s390 tree. If so,
> 
> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> 
> Thanks.

Yes, I would take it via s390 tree. Thank you!
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index fa0fbe7851ea..ff4cff29fe46 100644
--- a/Makefile
+++ b/Makefile
@@ -419,6 +419,7 @@  NM		= $(CROSS_COMPILE)nm
 STRIP		= $(CROSS_COMPILE)strip
 OBJCOPY		= $(CROSS_COMPILE)objcopy
 OBJDUMP		= $(CROSS_COMPILE)objdump
+OBJSIZE		= $(CROSS_COMPILE)size
 PAHOLE		= pahole
 LEX		= flex
 YACC		= bison
@@ -474,9 +475,9 @@  KBUILD_LDFLAGS :=
 GCC_PLUGINS_CFLAGS :=
 
 export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
-export CPP AR NM STRIP OBJCOPY OBJDUMP PAHOLE KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS
-export MAKE LEX YACC AWK INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
-export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
+export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE PAHOLE LEX YACC AWK INSTALLKERNEL
+export PERL PYTHON PYTHON2 PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
+export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE
 
 export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS
 export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE