}
void
-_bfd_elf_link_hash_hide_symbol(h)
+_bfd_elf_link_hash_hide_symbol(info, h)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
struct elf_link_hash_entry *h;
{
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
/* If this reloc section does not use the main symbol table we
don't treat it as a reloc section. BFD can't adequately
represent such a section, so at least for now, we don't
- try. We just present it as a normal section. */
- if (hdr->sh_link != elf_onesymtab (abfd))
+ try. We just present it as a normal section. We also
+ can't use it as a reloc section if it points to the null
+ section. */
+ if (hdr->sh_link != elf_onesymtab (abfd) || hdr->sh_info == SHN_UNDEF)
return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
if (! bfd_section_from_shdr (abfd, hdr->sh_info))
*failedptr = true;
}
-/* Get elf arch size (32 / 64).
- Returns -1 if not elf. */
-
-int
-bfd_elf_get_arch_size (abfd)
- bfd *abfd;
-{
- if (abfd->xvec->flavour != bfd_target_elf_flavour)
- {
- bfd_set_error (bfd_error_wrong_format);
- return -1;
- }
-
- return (get_elf_backend_data (abfd))->s->arch_size;
-}
-
/* Assign all ELF section numbers. The dummy first section is handled here
too. The link/info pointers for the standard section types are filled
in here too, while we're at it. */
/* This is a .stab section. */
elf_section_data (s)->this_hdr.sh_entsize =
- 4 + 2 * bfd_elf_get_arch_size (abfd) / 8;
+ 4 + 2 * bfd_get_arch_size (abfd) / 8;
}
}
break;
i_ehdrp->e_machine = EM_NONE;
break;
case bfd_arch_sparc:
- if (bfd_elf_get_arch_size (abfd) == 64)
+ if (bfd_get_arch_size (abfd) == 64)
i_ehdrp->e_machine = EM_SPARCV9;
else
i_ehdrp->e_machine = EM_SPARC;
case bfd_arch_ia64:
i_ehdrp->e_machine = EM_IA_64;
break;
+ case bfd_arch_m68hc11:
+ i_ehdrp->e_machine = EM_68HC11;
+ break;
+ case bfd_arch_m68hc12:
+ i_ehdrp->e_machine = EM_68HC12;
+ break;
case bfd_arch_m68k:
i_ehdrp->e_machine = EM_68K;
break;
char buf[100];
char* name;
asection* sect;
+ int raw_size;
if (note->descsz == sizeof (prstatus_t))
{
prstatus_t prstat;
+ raw_size = sizeof (prstat.pr_reg);
memcpy (&prstat, note->descdata, sizeof (prstat));
elf_tdata (abfd)->core_signal = prstat.pr_cursig;
/* 64-bit host, 32-bit corefile */
prstatus32_t prstat;
+ raw_size = sizeof (prstat.pr_reg);
memcpy (&prstat, note->descdata, sizeof (prstat));
elf_tdata (abfd)->core_signal = prstat.pr_cursig;
if (note->descsz == sizeof (prstatus_t))
{
- sect->_raw_size = sizeof (prgregset_t);
+ sect->_raw_size = raw_size;
sect->filepos = note->descpos + offsetof (prstatus_t, pr_reg);
}
#if defined (__sparcv9)
else if (note->descsz == sizeof (prstatus32_t))
{
- sect->_raw_size = sizeof (prgregset32_t);
+ sect->_raw_size = raw_size;
sect->filepos = note->descpos + offsetof (prstatus32_t, pr_reg);
}
#endif