This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Multiple sections with the same name again


On Mon, May 24, 2004 at 11:02:41AM +0200, Jakub Jelinek wrote:
> On Mon, May 24, 2004 at 08:18:11PM +0930, Alan Modra wrote:
> > bfd/ChangeLog
> > 	* elflink.c (elf_link_add_object_symbols): Don't set up merge
> > 	section data here..
> > 	* elf.c (_bfd_elf_merge_sections): .. Do it here instead.
> > 	* merge.c (_bfd_merge_section): Update comment.  Don't test
> > 	section name to determine sinfo group, instead test output
> > 	section.
> > ld/ChangeLog
> > 	* ldlang.c (lang_process): Call bfd_merge_sections later, and
> > 	only when not a relocatable link.
> 
> Actually, thinking about it more, the name check is desirable.
> Consider say .rodata.str1.1 and .rodata.str1.32 sections GCC used to
> emit until very recently on IA-32.  These sections have both sh_entsize 1,
> SHF_MERGE|SHF_STRINGS, the same output section (.rodata), yet you don't
> want to merge them together because of the different alignment rules.
> If they are merged together, then I'm afraid several strings from the
> .rodata.str1.1 input sections will suddenly be forced to have 32-byte
> alignment unnecessarily.
> 
> Cannot we use the output_section check AND name comparison?

We could, but I'd prefer to avoid name comparison.  Can't we check
alignment, if that's the relevant test?

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]