mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 23:34:02 +08:00
(elf64_hppa_object_p): Set architecture and machine from elf header flags.
This commit is contained in:
parent
956eedd4dc
commit
d9634ba1ff
@ -2,6 +2,8 @@
|
||||
|
||||
* elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
|
||||
(elf_backend_get_symbol_type): Define.
|
||||
(elf64_hppa_object_p): Set architecture and machine from elf
|
||||
header flags.
|
||||
|
||||
2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
|
||||
|
||||
|
@ -358,8 +358,21 @@ static boolean
|
||||
elf64_hppa_object_p (abfd)
|
||||
bfd *abfd;
|
||||
{
|
||||
/* Set the right machine number for an HPPA ELF file. */
|
||||
return bfd_default_set_arch_mach (abfd, bfd_arch_hppa, 25);
|
||||
unsigned int flags = elf_elfheader (abfd)->e_flags;
|
||||
|
||||
switch (flags & (EF_PARISC_ARCH | EF_PARISC_WIDE))
|
||||
{
|
||||
case EFA_PARISC_1_0:
|
||||
return bfd_default_set_arch_mach (abfd, bfd_arch_hppa, 10);
|
||||
case EFA_PARISC_1_1:
|
||||
return bfd_default_set_arch_mach (abfd, bfd_arch_hppa, 11);
|
||||
case EFA_PARISC_2_0:
|
||||
return bfd_default_set_arch_mach (abfd, bfd_arch_hppa, 20);
|
||||
case EFA_PARISC_2_0 | EF_PARISC_WIDE:
|
||||
return bfd_default_set_arch_mach (abfd, bfd_arch_hppa, 25);
|
||||
}
|
||||
/* Don't be fussy. */
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Given section type (hdr->sh_type), return a boolean indicating
|
||||
|
Loading…
Reference in New Issue
Block a user