From: Thomas Huth <thuth@redhat.com>
To: Andrew Jones <drjones@redhat.com>, kvm@vger.kernel.org
Cc: lvivier@redhat.com, rkrcmar@redhat.com
Subject: Re: [kvm-unit-tests PATCH v2 4/4] powerpc/ppc64: populate argv[0] with prognam
Date: Fri, 22 Apr 2016 19:50:46 +0200 [thread overview]
Message-ID: <571A6476.8030505@redhat.com> (raw)
In-Reply-To: <1461336889-27472-5-git-send-email-drjones@redhat.com>
On 22.04.2016 16:54, Andrew Jones wrote:
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
> lib/argv.c | 6 ------
> powerpc/Makefile.common | 6 +++++-
> 2 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/lib/argv.c b/lib/argv.c
> index 66cd43f24d336..63b9ab2af2d2a 100644
> --- a/lib/argv.c
> +++ b/lib/argv.c
> @@ -38,9 +38,7 @@ void __setup_args(void)
>
> void setup_args(char *args)
> {
> -#if defined(__arm__) || defined(__aarch64__)
> const char *p;
> -#endif
>
> if (args) {
> __args = args;
> @@ -51,13 +49,9 @@ void setup_args(char *args)
> } else {
> copy_ptr = __args_copy;
> }
> -#if defined(__arm__) || defined(__aarch64__)
> __argv[0] = copy_ptr;
> p = auxinfo.prognam;
> while ((*copy_ptr++ = *p++) != 0)
> ;
> -#else
> - __argv[0] = NULL; //HACK: just reserve argv[0] for now
> -#endif
> ++__argc;
> }
> diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common
> index 4449aec616853..150f5fc06bc2b 100644
> --- a/powerpc/Makefile.common
> +++ b/powerpc/Makefile.common
> @@ -24,6 +24,7 @@ CFLAGS += -fpie
>
> asm-offsets = lib/$(ARCH)/asm-offsets.h
> include scripts/asm-offsets.mak
> +include scripts/auxinfo.mak
>
> cflatobjs += lib/util.o
> cflatobjs += lib/alloc.o
> @@ -38,9 +39,12 @@ FLATLIBS = $(libcflat) $(LIBFDT_archive)
> %.elf: CFLAGS += $(arch_CFLAGS)
> %.elf: LDFLAGS = $(arch_LDFLAGS) -nostdlib -pie
> %.elf: %.o $(FLATLIBS) powerpc/flat.lds
> + $(call gen-auxinfo,$(@:.elf=.aux.c),$@)
> + $(CC) $(CFLAGS) -c -o $(@:.elf=.aux.o) $(@:.elf=.aux.c)
> $(LD) $(LDFLAGS) -o $@ \
> -T powerpc/flat.lds --build-id=none \
> - $(filter %.o, $^) $(FLATLIBS)
> + $(filter %.o, $^) $(FLATLIBS) $(@:.elf=.aux.o)
> + $(RM) $(@:.elf=.aux).*
> @echo -n Checking $@ for unsupported reloc types...
> @if $(OBJDUMP) -R $@ | grep R_ | grep -v R_PPC64_RELATIVE; then \
> false; \
>
Reviewed-by: Thomas Huth <thuth@redhat.com>
prev parent reply other threads:[~2016-04-22 17:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-22 14:54 [kvm-unit-tests PATCH v2 0/4] arm/powerpc: make argv[0] the program name Andrew Jones
2016-04-22 14:54 ` [kvm-unit-tests PATCH v2 1/4] arm/arm64: reserve argv[0] for prognam Andrew Jones
2016-04-22 17:23 ` Thomas Huth
2016-04-22 17:36 ` Andrew Jones
2016-04-22 14:54 ` [kvm-unit-tests PATCH v2 2/4] powerpc/ppc64: " Andrew Jones
2016-04-22 17:24 ` Thomas Huth
2016-04-22 14:54 ` [kvm-unit-tests PATCH v2 3/4] arm/arm64: populate argv[0] with prognam Andrew Jones
2016-04-22 17:48 ` Thomas Huth
2016-04-22 18:05 ` Andrew Jones
2016-04-22 14:54 ` [kvm-unit-tests PATCH v2 4/4] powerpc/ppc64: " Andrew Jones
2016-04-22 17:50 ` Thomas Huth [this message]
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=571A6476.8030505@redhat.com \
--to=thuth@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lvivier@redhat.com \
--cc=rkrcmar@redhat.com \
/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.