Skip to content

Commit cc37fea

Browse files
committed
Have EXECFN and HWCAP2 written to AUX vector
1 parent b63810d commit cc37fea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

qiling/loader/elf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ def __push_str(top: int, s: str) -> int:
335335

336336
new_stack = randstraddr = __push_str(new_stack, 'a' * 16)
337337
new_stack = cpustraddr = __push_str(new_stack, 'i686')
338+
new_stack = execfn = __push_str(new_stack, argv[0])
338339

339340
# store aux vector data for gdb use
340341
elf_phdr = load_address + elffile['e_phoff']
@@ -369,6 +370,8 @@ def __push_str(top: int, s: str) -> int:
369370
(AUX.AT_HWCAP, elf_hwcap),
370371
(AUX.AT_CLKTCK, 100),
371372
(AUX.AT_RANDOM, randstraddr),
373+
(AUX.AT_HWCAP2, 0),
374+
(AUX.AT_EXECFN, execfn),
372375
(AUX.AT_PLATFORM, cpustraddr),
373376
(AUX.AT_SECURE, 0),
374377
(AUX.AT_NULL, 0)

0 commit comments

Comments
 (0)