This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: x86-64 large data sections updated
- From: Jan Hubicka <jh at suse dot cz>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, binutils at sources dot redhat dot com,hjl at lucon dot org
- Date: Wed, 15 Jun 2005 01:43:31 +0200
- Subject: Re: x86-64 large data sections updated
- References: <20050614221315.GF19948@kam.mff.cuni.cz> <20050614233759.GB2755@redhat.com>
> 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~