Skip to content

Allow dot in PE symbol name#270

Closed
GabrielGanne wants to merge 1 commit intoerocarrera:masterfrom
GabrielGanne:symbol-name-dot
Closed

Allow dot in PE symbol name#270
GabrielGanne wants to merge 1 commit intoerocarrera:masterfrom
GabrielGanne:symbol-name-dot

Conversation

@GabrielGanne
Copy link
Copy Markdown
Contributor

Hi,

Although it is indeed forbidden as part of function names, the dot character is allowed as part of a symbol name. This happens for instance when building with optimization flags.

I stumbled upon such a case with mingw64's libpython3.7m.dll (compiled as described here: https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-python3/PKGBUILD).

I've uploaded a copy of the resulting library here for your convenience : https://gist.github.com/GabrielGanne/682807a60f8eb537f6a9f2e674c84308

The expected symbol output should be as follow:

# python3 ./pefile.py exports libpython3.7m.dll
...
0x6236c960 b'PyErr_CheckSignals' 172
0x62368996 b'PyErr_CheckSignals.part.0' 173 # otherwise all names are None below this point
0x623c0460 b'PyErr_Clear' 174
...

Best regards

When building with optimization flag enable, it is possible to generate
symbol names such as 'PyErr_CheckSignals.part.0' which contain a dot.
Simply add '.' to the allowed_function_name list.
@erocarrera
Copy link
Copy Markdown
Owner

Thanks, this was addressed in #346

@erocarrera erocarrera closed this Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants