x86-64 large data sections updated

Ian Lance Taylor ian@airs.com
Wed Jun 15 19:35:00 GMT 2005


Richard Henderson <rth@redhat.com> writes:

> > OK, so dropping here the lcommon test sounds sane?
> 
> The entire function is not sane.  The .largecomm assembler directive
> should set the section to SHN_X86_64_LARGE_COMMON, and that should be
> the end of it.  Once COMMON symbols get mapped into .lcommon/.lbss
> sections, they don't return.

There is no interface for gas to set the ELF section of a symbol,
except to set the symbol of the BFD symbol to some BFD section.  So
unless we introduce such an interface, the only way to do this is to
use a magic BFD section, which then gets translated into the
appropriate ELF section code.  That is how the MIPS backend handles
SHN_MIPS_SCOMMON--gas puts the symbol in ".scommon" and
_bfd_mips_elf_section_from_bfd_section translates ".scommon" into
SHN_MIPS_SCOMMON.  That seems to be what Jan is emulating in his code.

Ian



More information about the Binutils mailing list