diff options
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/config.bfd | 8 | ||||
-rw-r--r-- | bfd/elf64-x86-64.c | 18 | ||||
-rw-r--r-- | include/ChangeLog | 5 | ||||
-rw-r--r-- | include/elf/common.h | 1 | ||||
-rw-r--r-- | include/elf/x86-64.h | 4 |
6 files changed, 41 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fcaa49937f5..9f24c81a949 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2004-10-08 Daniel Jacobowitz <dan@debian.org> + + * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*. + * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function. + (elf_backend_section_from_shdr): Define. + 2004-10-08 Alan Modra <amodra@bigpond.net.au> * syms.c (bfd_is_local_label): Return false for file symbols. diff --git a/bfd/config.bfd b/bfd/config.bfd index d4e0e604abb..84ecb1bf1fd 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -424,12 +424,18 @@ case "${targ}" in targ_defvec=i386coff_vec targ_selvecs=bfd_elf32_i386_vec ;; - i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | i[3-7]86-*-solaris2* | \ + i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | \ i[3-7]86-*-elf | i[3-7]86-*-sco3.2v5* | \ i[3-7]86-*-dgux* | i[3-7]86-*-sysv5*) targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386coff_vec ;; + i[3-7]86-*-solaris2*) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs=i386coff_vec + targ64_selvecs=bfd_elf64_x86_64_vec + want64=true + ;; i[3-7]86-*-kaos*) targ_defvec=bfd_elf32_i386_vec targ_selvecs=bfd_elf32_i386_vec diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 8737f234358..f039fa7eb49 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -2782,6 +2782,21 @@ elf64_x86_64_plt_sym_val (bfd_vma i, const asection *plt, return plt->vma + (i + 1) * PLT_ENTRY_SIZE; } +/* Handle an x86-64 specific section when reading an object file. This + is called when elfcode.h finds a section with an unknown type. */ + +static bfd_boolean +elf64_x86_64_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name) +{ + if (hdr->sh_type != SHT_X86_64_UNWIND) + return FALSE; + + if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name)) + return FALSE; + + return TRUE; +} + #define TARGET_LITTLE_SYM bfd_elf64_x86_64_vec #define TARGET_LITTLE_NAME "elf64-x86-64" #define ELF_ARCH bfd_arch_i386 @@ -2819,4 +2834,7 @@ elf64_x86_64_plt_sym_val (bfd_vma i, const asection *plt, #define elf_backend_object_p elf64_x86_64_elf_object_p #define bfd_elf64_mkobject elf64_x86_64_mkobject +#define elf_backend_section_from_shdr \ + elf64_x86_64_section_from_shdr + #include "elf64-target.h" diff --git a/include/ChangeLog b/include/ChangeLog index ed9edb2b87c..a3cbebedd96 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2004-10-08 Daniel Jacobowitz <dan@debian.org> + + * elf/common.h (PT_SUNW_EH_FRAME): Define. + * elf/x86-64.h (SHT_X86_64_UNWIND): Define. + 2004-10-07 Bob Wilson <bob.wilson@acm.org> * xtensa-config.h (XSHAL_USE_ABSOLUTE_LITERALS, diff --git a/include/elf/common.h b/include/elf/common.h index 5573fca7678..db92ff6a8f8 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -290,6 +290,7 @@ #define PT_HIPROC 0x7FFFFFFF /* Processor-specific */ #define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) /* Frame unwind information */ +#define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */ #define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */ #define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */ diff --git a/include/elf/x86-64.h b/include/elf/x86-64.h index 7e9100dba4a..2252bd0d10a 100644 --- a/include/elf/x86-64.h +++ b/include/elf/x86-64.h @@ -53,4 +53,8 @@ START_RELOC_NUMBERS (elf_x86_64_reloc_type) RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251) /* GNU C++ hack */ END_RELOC_NUMBERS (R_X86_64_max) +/* Processor specific section types. */ + +#define SHT_X86_64_UNWIND 0x70000001 /* unwind information */ + #endif |