On 05/07/2015 06:30 AM, Segher Boessenkool wrote:
On Thu, May 07, 2015 at 10:15:08AM +0200, Marek Polacek wrote:
+const char *
+function_mergeable_rodata_prefix (void)

This function needs a comment.

And much more importantly, I forgot to make it static.  Fixed.

+{
+  section *s = targetm.asm_out.function_rodata_section (current_function_decl);
+  if (SECTION_STYLE (s) == SECTION_NAMED)
+    return s->named.name;
+      else
+    return targetm.asm_out.mergeable_rodata_prefix;

else is wrongly formatted.

Huh, how did I do this.  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 on powerpc64-linux; no regressions.

Is this okay for trunk?


Segher


2015-05-07  Segher Boessenkool  <seg...@kernel.crashing.org>

        PR middle-end/192
        PR middle-end/54303
        * varasm.c (function_mergeable_rodata_prefix): New function.
        (mergeable_string_section): Use it.
        (mergeable_constant_section): Use it.
If you could cobble together a little test (ppc specific is fine with me) it'd be appreciated.

With that, approved for the trunk.

THanks,
jeff

Reply via email to