mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
Merge branch 'x86/asm' into x86/urgent, to pick up fix
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
7946c2beac
1 changed files with 6 additions and 0 deletions
|
@ -22,6 +22,9 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
|
||||||
|
|
||||||
ELF(Phdr) *pt = (ELF(Phdr) *)(raw_addr + GET_LE(&hdr->e_phoff));
|
ELF(Phdr) *pt = (ELF(Phdr) *)(raw_addr + GET_LE(&hdr->e_phoff));
|
||||||
|
|
||||||
|
if (hdr->e_type != ET_DYN)
|
||||||
|
fail("input is not a shared object\n");
|
||||||
|
|
||||||
/* Walk the segment table. */
|
/* Walk the segment table. */
|
||||||
for (i = 0; i < GET_LE(&hdr->e_phnum); i++) {
|
for (i = 0; i < GET_LE(&hdr->e_phnum); i++) {
|
||||||
if (GET_LE(&pt[i].p_type) == PT_LOAD) {
|
if (GET_LE(&pt[i].p_type) == PT_LOAD) {
|
||||||
|
@ -49,6 +52,9 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
|
||||||
if (stripped_len < load_size)
|
if (stripped_len < load_size)
|
||||||
fail("stripped input is too short\n");
|
fail("stripped input is too short\n");
|
||||||
|
|
||||||
|
if (!dyn)
|
||||||
|
fail("input has no PT_DYNAMIC section -- your toolchain is buggy\n");
|
||||||
|
|
||||||
/* Walk the dynamic table */
|
/* Walk the dynamic table */
|
||||||
for (i = 0; dyn + i < dyn_end &&
|
for (i = 0; dyn + i < dyn_end &&
|
||||||
GET_LE(&dyn[i].d_tag) != DT_NULL; i++) {
|
GET_LE(&dyn[i].d_tag) != DT_NULL; i++) {
|
||||||
|
|
Loading…
Reference in a new issue