Skip to content

Generates mangled symbol from a function signature

License

Notifications You must be signed in to change notification settings

EwanC/MrMangler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

___  ___    ___  ___                  _           
|  \/  |    |  \/  |                 | |          
| .  . |_ __| .  . | __ _ _ __   __ _| | ___ _ __ 
| |\/| | '__| |\/| |/ _` | '_ \ / _` | |/ _ \ '__|
| |  | | |  | |  | | (_| | | | | (_| | |  __/ |   
\_|  |_/_|  \_|  |_/\__,_|_| |_|\__, |_|\___|_|   
                                 __/ |            
                                |___/             

Author: Ewan Crawford

License: MIT

Small and quick mangler for function signatures. Aims to be cross platform to support itanium and windows mangling. As a result does the mangling itself rather than calling library function like __cxa_demangle.

Test status

Build Status Master

TODO

  • Windows Struct & Union back references

Status

The project is still in early stages on development, so is not expected to compile on platforms other than Linux.

Right now C language mangling with some C++ features like references is the target. To see exactly what's supported look at the file test/inputs.txt, containing the inputs tested against.

Examples

$ echo "foo(signed char a, float b, ...)" | ./MrMangler
_Z3fooafz

$ echo "bar(const uint32_t *const)" | ./MrMangler
_Z3barKPKj

$ echo "super_duper_function(struct my_struct **)" | ./MrMangler
_Z20super_duper_functionPP9my_struct

$ echo "AliceBob(signed char& packet)" | ./MrMangler
_Z8AliceBobRa

$ echo "int foo(float, bool (**)(char, int))" | ./MrMangler
_Z3foofPPFbciE

$ echo "const int16_t func_1(void)" | ./MrMangler -w
?func_1@@YA?BFXZ

$ echo "int foo(int (**const*)())" | ./MrMangler -w --cc=fastcall
?foo@@YIHPBQAP6IHXZ@Z

About

Generates mangled symbol from a function signature

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published