diff options
Diffstat (limited to 'include/asm-i386/elf.h')
-rw-r--r-- | include/asm-i386/elf.h | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h index 0515d61d5411..369035dfe4b6 100644 --- a/include/asm-i386/elf.h +++ b/include/asm-i386/elf.h | |||
@@ -168,50 +168,6 @@ do if (vdso_enabled) { \ | |||
168 | NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_COMPAT_BASE); \ | 168 | NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_COMPAT_BASE); \ |
169 | } while (0) | 169 | } while (0) |
170 | 170 | ||
171 | /* | ||
172 | * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out | ||
173 | * extra segments containing the vsyscall DSO contents. Dumping its | ||
174 | * contents makes post-mortem fully interpretable later without matching up | ||
175 | * the same kernel and hardware config to see what PC values meant. | ||
176 | * Dumping its extra ELF program headers includes all the other information | ||
177 | * a debugger needs to easily find how the vsyscall DSO was being used. | ||
178 | */ | ||
179 | #define ELF_CORE_EXTRA_PHDRS (VDSO_HIGH_EHDR->e_phnum) | ||
180 | #define ELF_CORE_WRITE_EXTRA_PHDRS \ | ||
181 | do { \ | ||
182 | const struct elf_phdr *const vsyscall_phdrs = \ | ||
183 | (const struct elf_phdr *) (VDSO_HIGH_BASE \ | ||
184 | + VDSO_HIGH_EHDR->e_phoff); \ | ||
185 | int i; \ | ||
186 | Elf32_Off ofs = 0; \ | ||
187 | for (i = 0; i < VDSO_HIGH_EHDR->e_phnum; ++i) { \ | ||
188 | struct elf_phdr phdr = vsyscall_phdrs[i]; \ | ||
189 | if (phdr.p_type == PT_LOAD) { \ | ||
190 | BUG_ON(ofs != 0); \ | ||
191 | ofs = phdr.p_offset = offset; \ | ||
192 | phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); \ | ||
193 | phdr.p_filesz = phdr.p_memsz; \ | ||
194 | offset += phdr.p_filesz; \ | ||
195 | } \ | ||
196 | else \ | ||
197 | phdr.p_offset += ofs; \ | ||
198 | phdr.p_paddr = 0; /* match other core phdrs */ \ | ||
199 | DUMP_WRITE(&phdr, sizeof(phdr)); \ | ||
200 | } \ | ||
201 | } while (0) | ||
202 | #define ELF_CORE_WRITE_EXTRA_DATA \ | ||
203 | do { \ | ||
204 | const struct elf_phdr *const vsyscall_phdrs = \ | ||
205 | (const struct elf_phdr *) (VDSO_HIGH_BASE \ | ||
206 | + VDSO_HIGH_EHDR->e_phoff); \ | ||
207 | int i; \ | ||
208 | for (i = 0; i < VDSO_HIGH_EHDR->e_phnum; ++i) { \ | ||
209 | if (vsyscall_phdrs[i].p_type == PT_LOAD) \ | ||
210 | DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr, \ | ||
211 | PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \ | ||
212 | } \ | ||
213 | } while (0) | ||
214 | |||
215 | #endif | 171 | #endif |
216 | 172 | ||
217 | #endif | 173 | #endif |