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

Mike Frysinger vapier@gentoo.org
Tue Sep 29 04:00:00 GMT 2015


On 19 Sep 2015 17:11, Romain Geissler wrote:
> --- a/gold/configure.ac
> +++ b/gold/configure.ac
>
> +AC_ARG_ENABLE(default-relro,
> +              [  --enable-default-relro       mark relocations read-only by default],

please use AS_HELP_STRING instead

> +[
> +  AC_DEFINE([ENABLE_DEFAULT_RELRO], [ ],
> +            [Define to mark relocations read-only by default.])
> +], [])

this is wrong for two reasons:
(1) you must check $enableval and change behavior based on that
(2) you should define it to a value like 1

you should also just omit the 4th arg

> --- a/ld/configure.ac
> +++ b/ld/configure.ac
>
> +AC_ARG_ENABLE(default-relro,
> +              [  --enable-default-relro       mark relocations read-only by default],
> +[
> +  AC_DEFINE([ENABLE_DEFAULT_RELRO], [ ],
> +            [Define to mark relocations read-only by default.])
> +], [])

same feedback here
-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/20150929/3aa0b431/attachment.sig>


More information about the Binutils mailing list