From 2fdd03c982386e1d13aed9f1b51e1f0eee237971 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Thu, 10 Mar 2016 15:32:37 +0000 Subject: Add symbolizer option to generate debug information only. There is no need to copy the .rodata and .text sections since the consumers can get their data form the original ELF file. We mark those section as SHT_NOBITS instead, which is the standard way to create ELF file with separate debug information only. The new option is called --only-keep-debug and it essentially has the same effect as --only-keep-debug option for "strip" command. Change-Id: I4f7488c04bbad86288beeda11c3bf295890e740d --- compiler/elf_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/elf_builder.h') diff --git a/compiler/elf_builder.h b/compiler/elf_builder.h index ef44a6fe1c..26ab281741 100644 --- a/compiler/elf_builder.h +++ b/compiler/elf_builder.h @@ -841,7 +841,7 @@ class ElfBuilder FINAL { load.p_type = PT_LOAD; load.p_flags = PF_R; load.p_offset = load.p_vaddr = load.p_paddr = 0; - load.p_filesz = load.p_memsz = sections_[0]->header_.sh_offset; + load.p_filesz = load.p_memsz = sizeof(Elf_Ehdr) + sizeof(Elf_Phdr) * kMaxProgramHeaders; load.p_align = kPageSize; phdrs.push_back(load); } -- cgit v1.2.3-59-g8ed1b