[PATCH] add a configure option for using RELRO by default

Mike Frysinger vapier@gentoo.org
Tue Nov 10 23:28:00 GMT 2015


On 10 Nov 2015 22:16, Romain Geissler wrote:
> --- a/gold/configure.ac
> +++ b/gold/configure.ac
>
> +# Decide whether you want to set "-z relro" by default

should be a dnl instead of a # ?

> +ac_default_relro=unset

i don't think we want the ac_ prefix since this isn't autoconf code.

would be better too imo to make this the 4th arg to AC_ARG_ENABLE below.

> +  *) AC_MSG_ERROR(bad value ${enableval} for default-relro option) ;;

should quote the arg with []

> +if test x$ac_default_relro == xyes ; then

quote the LHS and change the == to =

> +  AC_DEFINE(DEFAULT_RELRO, 1, [Define if you want to use read only relocations by default])

quote the 1st & 2nd arg with []

> +#ifdef DEFAULT_RELRO
> +#define DEFAULT_RELRO_VALUE true
> +#else
> +#define DEFAULT_RELRO_VALUE false
> +#endif

should use "# define" imo

> --- a/ld/configure.ac
> +++ b/ld/configure.ac

same feedback here as for gold
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20151110/977f5b32/attachment.sig>


More information about the Binutils mailing list