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

DSPHLE: Prevent AX GC and AX Wii symbol mixups #9889

Merged
merged 1 commit into from Jul 13, 2021

Conversation

leoetlino
Copy link
Member

Putting AX functions from AXVoice.h in an anonymous namespace does
successfully prevent compilers from merging those functions and
allows us to avoid ODR violations.

However, tools such as gdb still mix up AX GC and AX Wii functions
and variables because those have the exact same symbol names.

This can be fixed by using inline namespaces which are transparent
at the source code level but forces AX GC and AX Wii symbols to be
different.

Putting AX functions from AXVoice.h in an anonymous namespace does
successfully prevent compilers from merging those functions and
allows us to avoid ODR violations.

However, tools such as gdb still mix up AX GC and AX Wii functions
and variables because those have the exact same symbol names.

This can be fixed by using inline namespaces which are transparent
at the source code level but forces AX GC and AX Wii symbols to be
different.
@Tilka
Copy link
Member

Tilka commented Jul 13, 2021

Can't the anonymous namespace be removed now?

@leoetlino
Copy link
Member Author

Technically it could, but we don't use those functions externally so it makes sense for them to be in an anonymous namespace and get internal linkage.

@Tilka Tilka merged commit 8fcda4c into dolphin-emu:master Jul 13, 2021
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants