Re: [PATCH] Make mergeable read-only sections per-function, if requested.

2015-05-07 Thread Segher Boessenkool
On Thu, May 07, 2015 at 07:31:33AM -0600, Jeff Law wrote: > If you could cobble together a little test (ppc specific is fine with > me) it'd be appreciated. > > With that, approved for the trunk. I did one for *-*-linux*. Tested on powerpc64-linux and x86_64-linux. Committed. Segher 2015-05

Re: [PATCH] Make mergeable read-only sections per-function, if requested.

2015-05-07 Thread Jeff Law
tch: - - - Make mergeable read-only sections per-function, if requested. Currently GCC does not put mergeable read-only data in a per-function section, so the --gc-sections linker option does not do much for such data. Fix that. Bootstrapped and tested on powerpc64-linux; no regressions. Is this okay

Re: [PATCH] Make mergeable read-only sections per-function, if requested.

2015-05-07 Thread Jeff Law
On 05/07/2015 02:15 AM, Marek Polacek wrote: On Wed, May 06, 2015 at 03:59:33PM -0700, Segher Boessenkool wrote: Currently GCC does not put mergeable read-only data in a per-function section, so the -gc-sections linker option does not do much for such data. Fix that. Dunno if it is a good ide

Re: [PATCH] Make mergeable read-only sections per-function, if requested.

2015-05-07 Thread Segher Boessenkool
s. Fixed. Thanks for the review. New patch: - - - Make mergeable read-only sections per-function, if requested. Currently GCC does not put mergeable read-only data in a per-function section, so the --gc-sections linker option does not do much for such data. Fix that. Bootstrapped and tested

Re: [PATCH] Make mergeable read-only sections per-function, if requested.

2015-05-07 Thread Marek Polacek
On Wed, May 06, 2015 at 03:59:33PM -0700, Segher Boessenkool wrote: > Currently GCC does not put mergeable read-only data in a per-function > section, so the -gc-sections linker option does not do much for such > data. Fix that. Dunno if it is a good idea, but... > diff --git a/gcc/varasm.c b/gc

[PATCH] Make mergeable read-only sections per-function, if requested.

2015-05-06 Thread Segher Boessenkool
Currently GCC does not put mergeable read-only data in a per-function section, so the -gc-sections linker option does not do much for such data. Fix that. Bootstrapped and tested on powerpc64-linux; no regressions. Is this okay for trunk? Segher 2015-05-06 Segher Boessenkool PR m