[PATCH] Put .gnu.linkonce.t.* owned jumptables into .gnu.linkonce.r.* instead of .rodata
H. J. Lu
hjl@lucon.org
Wed Aug 11 17:46:00 GMT 2004
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.
More information about the Gcc-patches
mailing list