Skip to content

Commit 7946c2b

Browse files
author
Ingo Molnar
committed
Merge branch 'x86/asm' into x86/urgent, to pick up fix
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2 parents 609c19a + 57f90c3 commit 7946c2b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/x86/entry/vdso/vdso2c.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
2222

2323
ELF(Phdr) *pt = (ELF(Phdr) *)(raw_addr + GET_LE(&hdr->e_phoff));
2424

25+
if (hdr->e_type != ET_DYN)
26+
fail("input is not a shared object\n");
27+
2528
/* Walk the segment table. */
2629
for (i = 0; i < GET_LE(&hdr->e_phnum); i++) {
2730
if (GET_LE(&pt[i].p_type) == PT_LOAD) {
@@ -49,6 +52,9 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
4952
if (stripped_len < load_size)
5053
fail("stripped input is too short\n");
5154

55+
if (!dyn)
56+
fail("input has no PT_DYNAMIC section -- your toolchain is buggy\n");
57+
5258
/* Walk the dynamic table */
5359
for (i = 0; dyn + i < dyn_end &&
5460
GET_LE(&dyn[i].d_tag) != DT_NULL; i++) {

0 commit comments

Comments
 (0)