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

Side by Side Diff: chrome/nacl/nacl_helper_bootstrap_munge_phdr.c

Issue 8811002: Revert 113074 - Use nacl_helper_bootstrap from native_client repository (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:mergeinfo
OLDNEW
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * This is a trivial program to edit an ELF file in place, making 5 * This is a trivial program to edit an ELF file in place, making
6 * one crucial modification to a program header. It's invoked: 6 * one crucial modification to a program header. It's invoked:
7 * bootstrap_phdr_hacker FILENAME SEGMENT_NUMBER 7 * bootstrap_phdr_hacker FILENAME SEGMENT_NUMBER
8 * where SEGMENT_NUMBER is the zero-origin index of the program header 8 * where SEGMENT_NUMBER is the zero-origin index of the program header
9 * we'll touch. This is a PT_LOAD with p_filesz of zero. We change its 9 * we'll touch. This is a PT_LOAD with p_filesz of zero. We change its
10 * p_filesz to match its p_memsz value. 10 * p_filesz to match its p_memsz value.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 if (elf_flagphdr(elf, ELF_C_SET, ELF_F_DIRTY) == 0) 57 if (elf_flagphdr(elf, ELF_C_SET, ELF_F_DIRTY) == 0)
58 error(2, 0, "elf_flagphdr: %s", elf_errmsg(-1)); 58 error(2, 0, "elf_flagphdr: %s", elf_errmsg(-1));
59 59
60 if (elf_update(elf, ELF_C_WRITE) < 0) 60 if (elf_update(elf, ELF_C_WRITE) < 0)
61 error(2, 0, "elf_update: %s", elf_errmsg(-1)); 61 error(2, 0, "elf_update: %s", elf_errmsg(-1));
62 62
63 close(fd); 63 close(fd);
64 64
65 return 0; 65 return 0;
66 } 66 }
OLDNEW
« no previous file with comments | « chrome/nacl/nacl_helper_bootstrap_linux.x ('k') | chrome/nacl/nacl_helper_bootstrap_munge_phdr.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698