diff options
author | Alan Modra <amodra@bigpond.net.au> | 2001-01-14 11:12:52 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2001-01-14 11:12:52 +0000 |
commit | 0491a74fad9e1823b6d8dec091257a1764980206 (patch) | |
tree | ba990224579b95b1ec8319d5393cec368a995f6a /bfd/elf32-hppa.c | |
parent | 6e4743fc45bdc0ff992b016397fae8c4d56cebdc (diff) | |
download | gdb-0491a74fad9e1823b6d8dec091257a1764980206.tar.gz |
Linux target variants for elfxx-hppa.
Diffstat (limited to 'bfd/elf32-hppa.c')
-rw-r--r-- | bfd/elf32-hppa.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 10253fef71e..13f1e5a37da 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -399,6 +399,9 @@ static boolean elf32_hppa_finish_dynamic_symbol static boolean elf32_hppa_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); +static void elf32_hppa_post_process_headers + PARAMS ((bfd *, struct bfd_link_info *)); + static int elf32_hppa_elf_get_symbol_type PARAMS ((Elf_Internal_Sym *, int)); @@ -4233,6 +4236,27 @@ elf32_hppa_finish_dynamic_sections (output_bfd, info) return true; } +/* Tweak the OSABI field of the elf header. */ + +static void +elf32_hppa_post_process_headers (abfd, link_info) + bfd *abfd; + struct bfd_link_info *link_info ATTRIBUTE_UNUSED; +{ + Elf_Internal_Ehdr * i_ehdrp; + + i_ehdrp = elf_elfheader (abfd); + + if (strcmp (bfd_get_target (abfd), "elf32-hppa-linux") == 0) + { + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX; + } + else + { + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_HPUX; + } +} + /* Called when writing out an object file to decide the type of a symbol. */ static int @@ -4269,6 +4293,7 @@ elf32_hppa_elf_get_symbol_type (elf_sym, type) #define elf_backend_gc_sweep_hook elf32_hppa_gc_sweep_hook #define elf_backend_object_p elf32_hppa_object_p #define elf_backend_final_write_processing elf_hppa_final_write_processing +#define elf_backend_post_process_headers elf32_hppa_post_process_headers #define elf_backend_get_symbol_type elf32_hppa_elf_get_symbol_type #define elf_backend_can_gc_sections 1 @@ -4285,3 +4310,11 @@ elf32_hppa_elf_get_symbol_type (elf_sym, type) #define ELF_MAXPAGESIZE 0x1000 #include "elf32-target.h" + +#undef TARGET_BIG_SYM +#define TARGET_BIG_SYM bfd_elf32_hppa_linux_vec +#undef TARGET_BIG_NAME +#define TARGET_BIG_NAME "elf32-hppa-linux" + +#define INCLUDED_TARGET_FILE 1 +#include "elf32-target.h" |