Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demangle support #6

Open
kassane opened this issue Jun 20, 2022 · 4 comments
Open

Demangle support #6

kassane opened this issue Jun 20, 2022 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kassane
Copy link

kassane commented Jun 20, 2022

Although the goal is to integrate into zig toolchain, assuming there is some internal difference.

Can you tell me if the standalone zld supports c++ demangle if used in place of the default linker?

Already in the zig language I have been thinking about maybe trying the proposed solution for the rust demangle mold linker being a zig library by doing some zFFI tests.

For I believe it would be a more natural alternative than simply using @"_Zfoo".

e.g.:

@kubkon
Copy link
Owner

kubkon commented Jul 8, 2022

Hi @kassane! No, there is no C++ demangle support yet. I'd be happy to guide you through the codebase, and help you integrate it if you were thinking of implementing it, and would very much welcome it :-)

@kubkon kubkon added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jul 8, 2022
@kassane
Copy link
Author

kassane commented Jul 9, 2022

Thanks for the feedback.

While still working on converting the solution to zig, partly translate-c cannot help me completely. I have to redo some points manually before this step can be completed.

WIP: https://github.com/kassane/rsDemangle-zig/blob/main/src/demangle.zig

After the code transition I will try to insert it into my zld-fork (which already has in test sample rust and cpp code).

@kubkon
Copy link
Owner

kubkon commented Jul 30, 2022

Looks great @kassane! I'll be more than happy to accept your PR for inclusion in the main zld repo when you think it's ready!

@XVilka
Copy link

XVilka commented Jun 30, 2023

In Rizin we use our own library for demangling, in pure C. Maybe it could be helpful for you, at the very least to test against: https://github.com/rizinorg/rz-libdemangle

(Issues and PRs are welcome as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants