Ping [PATCH] for PR middle-end/31490
Ian Lance Taylor
iant@google.com
Sat May 19 15:56:00 GMT 2007
"Dinar Temirbulatov" <dtemirbulatov@gmail.com> writes:
> Bootstraped and tested on i686-pc-linux-gnu, with no new regressions,
> tested 4.2 version with gdb-sim on following architectures arm-elf,
> arm-none-eabi, mips-elf, mipsisa64-elf, powerpc-eabisim, sh-elf,
> powerpc-unknown-eabispe and i686-pc-linux-gnu with no new regressions.
> OK for trunk?
Please extend the comment to explain why the lookup_attribute call is
there. With that change, and with a ChangeLog entry, this is OK.
Thanks.
Ian
> --- gcc/varasm.c.orig 2007-05-02 20:31:07.000000000 +0400
> +++ gcc/varasm.c 2007-05-16 04:16:01.000000000 +0400
> @@ -5762,12 +5762,14 @@ categorize_decl_for_section (tree decl,
> be read-only or not, but whether the dynamic link will have to
> do something. If so, we wish to segregate the data in order to
> minimize cache misses inside the dynamic linker. */
> - if (reloc & targetm.asm_out.reloc_rw_mask ())
> + if (reloc & targetm.asm_out.reloc_rw_mask ()
> + && !lookup_attribute ("section", DECL_ATTRIBUTES (decl)))
> ret = reloc == 1 ? SECCAT_DATA_REL_LOCAL : SECCAT_DATA_REL;
> else
> ret = SECCAT_DATA;
> }
> - else if (reloc & targetm.asm_out.reloc_rw_mask ())
> + else if (reloc & targetm.asm_out.reloc_rw_mask ()
> + && !lookup_attribute ("section", DECL_ATTRIBUTES (decl)))
> ret = reloc == 1 ? SECCAT_DATA_REL_RO_LOCAL : SECCAT_DATA_REL_RO;
> else if (reloc || flag_merge_constants < 2)
> /* C and C++ don't allow different variables to share the same
More information about the Gcc-patches
mailing list