mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
FreezeTool: Don't write blobinfo to wrong offset
The mechanism for searching for a specific symbol in a Mach-O binary got tripped up when hitting the blobinfo stab entry, causing it to return an offset of 0.
This commit is contained in:
parent
f3c0fa06b3
commit
46ae5a52d3
4
direct/src/dist/FreezeTool.py
vendored
4
direct/src/dist/FreezeTool.py
vendored
@ -2153,7 +2153,9 @@ class Freezer:
|
|||||||
symoff += nlist_size
|
symoff += nlist_size
|
||||||
name = strings[strx : strings.find(b'\0', strx)]
|
name = strings[strx : strings.find(b'\0', strx)]
|
||||||
|
|
||||||
if name == b'_' + symbol_name:
|
# If the entry's type has any bits at 0xe0 set, it's a debug
|
||||||
|
# symbol, and will point us to the wrong place.
|
||||||
|
if name == b'_' + symbol_name and type & 0xe0 == 0:
|
||||||
# Find out in which segment this is.
|
# Find out in which segment this is.
|
||||||
for vmaddr, vmsize, fileoff in segments:
|
for vmaddr, vmsize, fileoff in segments:
|
||||||
# Is it defined in this segment?
|
# Is it defined in this segment?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user