Skip to content

Commit 6ff7425

Browse files
authored
plt: remove stale MIPS workaround (Gallopsled#2256)
Fixes Gallopsled#2042
1 parent a0c9da0 commit 6ff7425

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

pwnlib/elf/plt.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,6 @@ def prepare_unicorn_and_context(elf, got, address, data):
119119

120120
uc.mem_write(got, p_magic)
121121

122-
# Separately, Unicorn is apparently unable to hook unmapped memory
123-
# accesses on MIPS. So we also have to map the page that contains
124-
# the magic address.
125-
start = magic_addr & (~0xfff)
126-
try:
127-
uc.mem_map(start, 0x1000)
128-
except Exception:
129-
# Ignore double-mapping
130-
pass
131-
trap = packing.p32(0x34000000, endian=elf.endian)
132-
uc.mem_write(magic_addr, trap)
133-
134122
return uc, uc.context_save()
135123

136124

pwnlib/libcdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def unstrip_libc(filename):
217217
>>> libc = ELF(filename)
218218
>>> hex(libc.symbols.main_arena)
219219
'0x219c80'
220-
>>> unstrip_libc(which('python3'))
220+
>>> unstrip_libc(pwnlib.data.elf.get('test-x86'))
221221
False
222222
>>> filename = search_by_build_id('d1704d25fbbb72fa95d517b883131828c0883fe9', unstrip=True)
223223
>>> 'main_arena' in ELF(filename).symbols

0 commit comments

Comments
 (0)