This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Best way to make partial relro by default?
- From: Pedro Giffuni <pfg at FreeBSD dot org>
- To: binutils at sourceware dot org
- Date: Mon, 28 Sep 2015 13:48:02 -0500
- Subject: Re: Best way to make partial relro by default?
- Authentication-results: sourceware.org; auth=none
- References: <56096B76 dot 2080901 at FreeBSD dot org> <20150928164026 dot GO5140 at vapier dot lan>
Hello;
On 09/28/15 11:40, Mike Frysinger wrote:
On 28 Sep 2015 11:31, Pedro Giffuni wrote:
I noticed many linux distributions are making partial RELRO the default:
https://bugzilla.redhat.com/show_bug.cgi?id=807831
Some set it as the default in ld [1] some others set it in the gcc
specs. What would be the "blessed" way to do this for all the
distribution?
Gentoo has been doing this for about 9 years in the linker. current:
https://sources.gentoo.org/gentoo/src/patchsets/binutils/2.25.1/78_all_use-relro.patch
Ah yes, it is usually done in ld/ldmain.c or in ld/emultempl/elf32.em
Any chance to see this standardized in the GNU toolchain, perhaps in ld?
i think a configure flag in ld/ and gold/ would be appropriate here
I think so too, I find it more practical than modifying GCC and clang.
the default can of course still be disabled so I would like to see such
change upstreamed instead of seeing every distribution setting it on
it's own.
Unless there are downsides that I may not understand :-/.
Pedro.