x86-64 large data sections updated

Jan Hubicka jh@suse.cz
Tue Jun 14 23:43:00 GMT 2005


> On Wed, Jun 15, 2005 at 12:13:15AM +0200, Jan Hubicka wrote:
> > *************** get_program_header_size (bfd *abfd)
> > *** 4593,4598 ****
> > --- 4593,4607 ----
> >         segs += 2;
> >       }
> >   
> > +   if (bfd_get_section_by_name (abfd, ".ldata") != NULL
> > +       || bfd_get_section_by_name (abfd, ".lrodata") != NULL
> > +       || bfd_get_section_by_name (abfd, ".lbss") != NULL)
> 
> This shouldn't be in elf.c.  And you can need 2 segments, not
> just one.

Hmm, right.  I guess elf_backend_additional_program_headers is the right
place for this.  Now when lbss comes just after .bss, we will likely
need 1 segment for ldata, 1 segment for lrodata and lbss doesn't count,
or am I counting total nonsense?

> 
> > + elf64_x86_64_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED,
> > + 					asection *sec, int *retval)
> > + {
> > +   if (strcmp (bfd_get_section_name (abfd, sec), ".lcommon") == 0
> > +       || strcmp (bfd_get_section_name (abfd, sec), ".lbss") == 0)
> > +     {
> > +       *retval = SHN_X86_64_LCOMMON;
> 
> You never ever want this.  COMMON does not mean the same thing as bss.

OK, so dropping here the lcommon test sounds sane?

Thanks,
Honza
> 
> 
> r~



More information about the Binutils mailing list