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

Unified Diff: bfd/elf32-i386.c

Issue 256623012: Cherry pick some binutils NaCl strip/objcopy fixes in pnacl 2.23 branch. (Closed) Base URL: https://chromium.googlesource.com/native_client/nacl-binutils.git@master
Patch Set: need to cherry pick nops change too Created 6 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 | « bfd/elf-nacl.c ('k') | bfd/elf64-x86-64.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bfd/elf32-i386.c
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 1ee538465c545bb3bc9493f0f5c84a9030aafca1..aa29129b78956ce4f5e6530d79fda3e6ef5eea57 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -5199,9 +5199,19 @@ static const struct elf_i386_backend_data elf_i386_nacl_arch_bed =
0, /* is_vxworks */
};
+static bfd_boolean
+elf32_i386_nacl_elf_object_p (bfd *abfd)
+{
+ /* Set the right machine number for a NaCl i386 ELF32 file. */
+ bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_i386_i386_nacl);
+ return TRUE;
+}
+
#undef elf_backend_arch_data
#define elf_backend_arch_data &elf_i386_nacl_arch_bed
+#undef elf_backend_object_p
+#define elf_backend_object_p elf32_i386_nacl_elf_object_p
#undef elf_backend_modify_segment_map
#define elf_backend_modify_segment_map nacl_modify_segment_map
#undef elf_backend_modify_program_headers
@@ -5212,6 +5222,7 @@ static const struct elf_i386_backend_data elf_i386_nacl_arch_bed =
#include "elf32-target.h"
/* Restore defaults. */
+#undef elf_backend_object_p
#undef elf_backend_modify_segment_map
#undef elf_backend_modify_program_headers
#undef elf_backend_final_write_processing
« no previous file with comments | « bfd/elf-nacl.c ('k') | bfd/elf64-x86-64.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698