This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Put .gnu.linkonce.t.* owned jumptables into .gnu.linkonce.r.* instead of .rodata
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 11 Aug 2004 10:31:13 -0700
- Subject: Re: [PATCH] Put .gnu.linkonce.t.* owned jumptables into .gnu.linkonce.r.* instead of .rodata
- References: <20040811170254.GA22252@devserv.devel.redhat.com>
On Wed, Aug 11, 2004 at 01:02:59PM -0400, Jakub Jelinek wrote:
> Hi!
>
> With the latest binutils, it is impossible to link many bigger C++ programs,
> with errors like:
> `.LAAAA' referenced in section `.rodata' of BBBB.o: defined in discarded section `.gnu.linkonce.t.CCCC' of DDDD.o
> I know H.J.Lu posted a patch which did the support using section groups,
> but that on the other side requires the very latest binutils,
> while using .gnu.linkonce.r.* should IMHO work even with older binutils.
>
> Is it enough like this or should function_readonly_data_section call
> a target hook, whose default implementation would do what is in ATM
> and targets whcih don't use default_unique_section_1 would override it
> to simple readonly_data_section () call (or something else if they prefer)?
>
> 2004-08-11 Jakub Jelinek <jakub@redhat.com>
>
> PR c++/16276
> * output.h (function_readonly_data_section): New prototype.
> * varasm.c (function_readonly_data_section): New function.
> * final.c (final_scan_insn): Call it instead of
> readonly_data_section.
>
> * g++.old-deja/g++.other/comdat4.C: New test.
> * g++.old-deja/g++.other/comdat4-aux.cc: New.
Why not combine your patch with mine and choose one depending on if
comdat is supported or not?
BTW, I prefer malloc over alloca since the function name can be
very long.
H.J.