aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-msp430.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-03-14 02:56:45 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-03-14 02:56:45 +0000
commitd1036acbe72ee838ccf0c876be94884246589641 (patch)
tree760f152471afeae4adb28cfd3acbf31aaa5ab5b9 /bfd/elf32-msp430.c
parent0e0cefcbabaf5c324266363727adc8c9f6559990 (diff)
downloadgdb-d1036acbe72ee838ccf0c876be94884246589641.zip
gdb-d1036acbe72ee838ccf0c876be94884246589641.tar.gz
gdb-d1036acbe72ee838ccf0c876be94884246589641.tar.bz2
2007-03-13 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/3826 * elf-bfd.h (elf_backend_data): Add elf_osabi. (_bfd_elf_set_osabi): New. * elf.c (_bfd_elf_set_osabi): New. * elf32-hppa.c (elf32_hppa_post_process_headers): Removed. (elf_backend_post_process_headers): Defined with _bfd_elf_set_osabi. (ELF_OSABI): Properly defined for each target. * elf32-i370.c (i370_elf_post_process_headers): Removed. (ELF_OSABI): Defined. (elf_backend_post_process_headers): Defined with _bfd_elf_set_osabi. * elf32-i386.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd. (elf_i386_post_process_headers): Set EI_OSABI with elf_osabi. * elf32-msp430.c (elf32_msp430_post_process_headers): Removed. (ELF_OSABI): Defined. (elf_backend_post_process_headers): Defined with _bfd_elf_set_osabi. * elf64-alpha.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd. (elf64_alpha_fbsd_post_process_headers): Set EI_OSABI with elf_osabi. * elf64-hppa.c (elf64_hppa_post_process_headers): Set EI_OSABI with elf_osabi. (ELF_OSABI): Properly defined for each target. (elf_backend_post_process_headers): Defined with _bfd_elf_set_osabi for Linux. * elf64-sparc.c (elf64_sparc_fbsd_post_process_headers): Removed. (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd. (elf_backend_post_process_headers): Defined with _bfd_elf_set_osabi. * elf64-x86-64.c (elf64_x86_64_fbsd_post_process_headers): Removed. (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd. (elf_backend_post_process_headers): Defined with _bfd_elf_set_osabi. * elfcode.h (elf_object_p): Match the ELFOSABI_NONE ELF target with any ELF target of the compatible machine for which we do not have a specific backend. * elfxx-ia64.c (elfNN_hpux_post_process_headers): Set EI_OSABI with elf_osabi. * elfxx-target.h (ELF_OSABI): Default to ELFOSABI_NONE. (elfNN_bed): Initialize elf_osabi with ELF_OSABI.
Diffstat (limited to 'bfd/elf32-msp430.c')
-rw-r--r--bfd/elf32-msp430.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index 6889d46..c8124e7 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -656,21 +656,6 @@ elf32_msp430_object_p (bfd * abfd)
return bfd_default_set_arch_mach (abfd, bfd_arch_msp430, e_set);
}
-static void
-elf32_msp430_post_process_headers (bfd * abfd,
- struct bfd_link_info * link_info ATTRIBUTE_UNUSED)
-{
- Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */
-
- i_ehdrp = elf_elfheader (abfd);
-
-#ifndef ELFOSABI_STANDALONE
-#define ELFOSABI_STANDALONE 255
-#endif
-
- i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_STANDALONE;
-}
-
/* These functions handle relaxing for the msp430.
Relaxation required only in two cases:
- Bad hand coding like jumps from one section to another or
@@ -1174,6 +1159,7 @@ error_return:
#define ELF_MACHINE_CODE EM_MSP430
#define ELF_MACHINE_ALT1 EM_MSP430_OLD
#define ELF_MAXPAGESIZE 1
+#define ELF_OSABI ELFOSABI_STANDALONE
#define TARGET_LITTLE_SYM bfd_elf32_msp430_vec
#define TARGET_LITTLE_NAME "elf32-msp430"
@@ -1185,7 +1171,7 @@ error_return:
#define elf_backend_can_gc_sections 1
#define elf_backend_final_write_processing bfd_elf_msp430_final_write_processing
#define elf_backend_object_p elf32_msp430_object_p
-#define elf_backend_post_process_headers elf32_msp430_post_process_headers
+#define elf_backend_post_process_headers _bfd_elf_set_osabi
#define bfd_elf32_bfd_relax_section msp430_elf_relax_section
#include "elf32-target.h"