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

Unified Diff: bfd/elf64-x86-64.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/elf32-i386.c ('k') | binutils/objdump.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bfd/elf64-x86-64.c
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 344146b16f13195a9e398df69423380320119a09..c1376c0878ed13fd0c849dc54d000b1d76966d0a 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -5170,6 +5170,14 @@ static const struct bfd_elf_special_section
/* Native Client support. */
+static bfd_boolean
+elf64_x86_64_nacl_elf_object_p (bfd *abfd)
+{
+ /* Set the right machine number for a NaCl x86-64 ELF64 file. */
+ bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_x86_64_nacl);
+ return TRUE;
+}
+
#undef TARGET_LITTLE_SYM
#define TARGET_LITTLE_SYM bfd_elf64_x86_64_nacl_vec
#undef TARGET_LITTLE_NAME
@@ -5302,6 +5310,8 @@ static const struct elf_x86_64_backend_data elf_x86_64_nacl_arch_bed =
#undef elf_backend_arch_data
#define elf_backend_arch_data &elf_x86_64_nacl_arch_bed
+#undef elf_backend_object_p
+#define elf_backend_object_p elf64_x86_64_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
@@ -5313,6 +5323,14 @@ static const struct elf_x86_64_backend_data elf_x86_64_nacl_arch_bed =
/* Native Client x32 support. */
+static bfd_boolean
+elf32_x86_64_nacl_elf_object_p (bfd *abfd)
+{
+ /* Set the right machine number for a NaCl x86-64 ELF32 file. */
+ bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_x64_32_nacl);
+ return TRUE;
+}
+
#undef TARGET_LITTLE_SYM
#define TARGET_LITTLE_SYM bfd_elf32_x86_64_nacl_vec
#undef TARGET_LITTLE_NAME
@@ -5479,7 +5497,7 @@ elf64_k1om_elf_object_p (bfd *abfd)
#undef elf_backend_object_p
#define elf_backend_object_p \
- elf32_x86_64_elf_object_p
+ elf32_x86_64_nacl_elf_object_p
#undef elf_backend_bfd_from_remote_memory
#define elf_backend_bfd_from_remote_memory \
« no previous file with comments | « bfd/elf32-i386.c ('k') | binutils/objdump.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698