Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: binutils-2.20/bfd/elf32-mips.c

Issue 10020059: [MIPS] Adding binutils changes for MIPS/NaCl architecture. (Closed)
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « binutils-2.20/bfd/configure.in ('k') | binutils-2.20/bfd/targets.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: binutils-2.20/bfd/elf32-mips.c
===================================================================
--- a/binutils-2.20/bfd/elf32-mips.c
+++ b/binutils-2.20/bfd/elf32-mips.c
@@ -1823,3 +1823,42 @@
/* NOTE: elf_backend_rela_normal is not defined for MIPS. */
#include "elf32-target.h"
+
+/* Native Client targets. */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_tradlittlemips_nacl_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-tradlittlemips-nacl"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_tradbigmips_nacl_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-tradbigmips-nacl"
+
+#include "elf/nacl.h"
+
+#undef ELF_OSABI
+#define ELF_OSABI ELFOSABI_NACL
+
+static void
+elf32_mips_nacl_final_write_processing (bfd *abfd, bfd_boolean linker)
+{
+ _bfd_mips_elf_final_write_processing (abfd, linker);
+
+ elf_elfheader (abfd)->e_ident[EI_OSABI] = ELFOSABI_NACL;
+ elf_elfheader (abfd)->e_ident[EI_ABIVERSION] = EF_NACL_ABIVERSION;
+ elf_elfheader (abfd)->e_flags |= EF_NACL_ALIGN_16;
+}
+
+#undef elf32_bed
+#define elf32_bed elf32_mips_nacl_bed
+
+#undef elf_backend_final_write_processing
+#define elf_backend_final_write_processing elf32_mips_nacl_final_write_processing
+
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x10000
+
+#include "elf32-target.h"
+
+
« no previous file with comments | « binutils-2.20/bfd/configure.in ('k') | binutils-2.20/bfd/targets.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698