x86-64 large data sections updated
Jan Hubicka
jh@suse.cz
Wed Jun 15 10:57: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.
>
> > + 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.
Hmm, actually this is only place where SHN_X86_64_LCOMMON is introduced.
If I set the section as it is constructed from tc-i386.c I still get
GLOBAL visibility out of resulting file and I am not quite sure where
the SHN_X86_64_LCOMMON should be introduced (I originally attempted to
set it directly in gas when creating the symbol but that thing don't
seems to be used).
Perhaps I am constructing the .lbss section incorrectly but I am not
quite sure what is proper way here...
Honza
>
>
> r~
More information about the Binutils
mailing list