extern asection *_bfd_get_local_sym_section
(struct elf_reloc_cookie *, unsigned int) ATTRIBUTE_HIDDEN;
-/* Large common section. */
-extern asection _bfd_elf_large_com_section;
+/* Large common section (x86 only). */
+extern asection bfd_elf_large_com_section;
/* Hash for local symbol with the first section id, ID, in the input
file and the local symbol index, SYM. */
return n;
}
-/* It is only used by x86-64 so far.
- ??? This repeats *COM* id of zero. sec->id is supposed to be unique,
- but current usage would allow all of _bfd_std_section to be zero. */
-static const asymbol lcomm_sym
- = GLOBAL_SYM_INIT ("LARGE_COMMON", &_bfd_elf_large_com_section);
-asection _bfd_elf_large_com_section
- = BFD_FAKE_SECTION (_bfd_elf_large_com_section, &lcomm_sym,
- "LARGE_COMMON", 0, SEC_IS_COMMON);
-
bool
_bfd_elf_final_write_processing (bfd *abfd)
{
else if (isym->st_shndx == SHN_COMMON)
tsec = bfd_com_section_ptr;
else if (isym->st_shndx == SHN_X86_64_LCOMMON)
- tsec = &_bfd_elf_large_com_section;
+ tsec = &bfd_elf_large_com_section;
else
tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
}
elf_x86_64_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED,
asection *sec, int *index_return)
{
- if (sec == &_bfd_elf_large_com_section)
+ if (sec == &bfd_elf_large_com_section)
{
*index_return = SHN_X86_64_LCOMMON;
return true;
switch (elfsym->internal_elf_sym.st_shndx)
{
case SHN_X86_64_LCOMMON:
- asym->section = &_bfd_elf_large_com_section;
+ asym->section = &bfd_elf_large_com_section;
asym->value = elfsym->internal_elf_sym.st_size;
/* Common symbol doesn't set BSF_GLOBAL. */
asym->flags &= ~BSF_GLOBAL;
if ((elf_section_flags (sec) & SHF_X86_64_LARGE) == 0)
return bfd_com_section_ptr;
else
- return &_bfd_elf_large_com_section;
+ return &bfd_elf_large_com_section;
}
static bool
#define ELF64_DYNAMIC_INTERPRETER "/lib/ld64.so.1"
#define ELFX32_DYNAMIC_INTERPRETER "/lib/ldx32.so.1"
+/* ??? This repeats *COM* id of zero. sec->id is supposed to be unique,
+ but current usage would allow all of _bfd_std_section to be zero. */
+static const asymbol lcomm_sym
+ = GLOBAL_SYM_INIT ("LARGE_COMMON", &bfd_elf_large_com_section);
+asection bfd_elf_large_com_section
+ = BFD_FAKE_SECTION (bfd_elf_large_com_section, &lcomm_sym,
+ "LARGE_COMMON", 0, SEC_IS_COMMON);
+
bool
_bfd_x86_elf_mkobject (bfd *abfd)
{
case SHN_X86_64_LCOMMON:
if (!is_x86_64)
abort ();
- sec = &_bfd_elf_large_com_section;
+ sec = &bfd_elf_large_com_section;
break;
default:
sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
subseg_set (seg, subseg);
}
- elf_com_section_ptr = &_bfd_elf_large_com_section;
+ elf_com_section_ptr = &bfd_elf_large_com_section;
bss_section = lbss_section;
s_comm_internal (0, elf_common_parse);