OSDN Git Service
(root)
/
android-x86
/
bionic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64a8698
)
Do not adjust PT_GNU_STACK segment
author
Dmitriy Ivanov
<dimitry@google.com>
Mon, 4 May 2015 18:11:23 +0000
(11:11 -0700)
committer
Dmitriy Ivanov
<dimitry@google.com>
Mon, 4 May 2015 19:34:42 +0000
(12:34 -0700)
Bug: http://b/
20687795
Bug: http://b/
18051137
Change-Id: Ie8af3892cfbebcc0249e7981284c4ad97ff40317
(cherry picked from commit
064a9800f372b8efd6d7b08150ab5204e5304c84
)
tools/relocation_packer/src/elf_file.cc
patch
|
blob
|
history
diff --git
a/tools/relocation_packer/src/elf_file.cc
b/tools/relocation_packer/src/elf_file.cc
index
d06bd63
..
102d614
100644
(file)
--- a/
tools/relocation_packer/src/elf_file.cc
+++ b/
tools/relocation_packer/src/elf_file.cc
@@
-312,6
+312,13
@@
static void AdjustProgramHeaderOffsets(typename ELF::Phdr* program_headers,
for (size_t i = 0; i < count; ++i) {
typename ELF::Phdr* program_header = &program_headers[i];
+ // Do not adjust PT_GNU_STACK - it confuses gdb and results
+ // in incorrect unwinding if the executable is stripped after
+ // packing.
+ if (program_header->p_type == PT_GNU_STACK) {
+ continue;
+ }
+
if (program_header->p_offset > hole_start) {
// The hole start is past this segment, so adjust offset.
program_header->p_offset += hole_size;