qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 5/7] configure: Unnest detection of -z, relro and -z, now


From: Alex Bennée
Subject: Re: [PATCH v2 5/7] configure: Unnest detection of -z, relro and -z, now
Date: Tue, 07 Jan 2020 13:18:46 +0000
User-agent: mu4e 1.3.6; emacs 28.0.50

Richard Henderson <address@hidden> writes:

> There is nothing about these options that is related to PIE.
> Use them unconditionally.
>
> Signed-off-by: Richard Henderson <address@hidden>

Reviewed-by: Alex Bennée <address@hidden>

> ---
> v2: Do not split into two tests.
> ---
>  configure | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index 7a646ec007..2503288654 100755
> --- a/configure
> +++ b/configure
> @@ -2040,9 +2040,6 @@ if test "$pie" != "no" ; then
>      QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
>      LDFLAGS="-pie $LDFLAGS"
>      pie="yes"
> -    if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then
> -      LDFLAGS="-Wl,-z,relro -Wl,-z,now $LDFLAGS"
> -    fi
>    else
>      if test "$pie" = "yes"; then
>        error_exit "PIE not available due to missing toolchain support"
> @@ -2053,6 +2050,12 @@ if test "$pie" != "no" ; then
>    fi
>  fi
>  
> +# Detect support for PT_GNU_RELRO + DT_BIND_NOW.
> +# The combination is known as "full relro", because .got is read-only too.
> +if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then
> +  LDFLAGS="-Wl,-z,relro -Wl,-z,now $LDFLAGS"
> +fi
> +
>  ##########################################
>  # __sync_fetch_and_and requires at least -march=i486. Many toolchains
>  # use i686 as default anyway, but for those that don't, an explicit


-- 
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]