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

Remove -rdynamic linker flag #142

Merged
merged 2 commits into from
Nov 20, 2023
Merged

Conversation

griffi-gh
Copy link
Contributor

@griffi-gh griffi-gh commented Oct 21, 2023

Seems to fix debug builds on windows

@rollerozxa
Copy link
Collaborator

Just wondering, what does -rdynamic do and could we remove it for all platforms? I just brought it over from the old build flags, but if it doesn't do much we can just completely remove it.

@griffi-gh
Copy link
Contributor Author

griffi-gh commented Oct 21, 2023

Just wondering, what does -rdynamic do and could we remove it for all platforms? I just brought it over from the old build flags, but if it doesn't do much we can just completely remove it.

im actually not sure...
if i understand it correctly, it exports everything (even otherwise unused stuff) in the final binary, which probably makes debugging easier or something? (or required by some dbg tool?)

... If you use "dlopen" to load a dynamic object which needs to refer back to the symbols defined by the program, rather than some other dynamic object, then you will probably need to use this option when linking the program itself. ...

it's not used in release builds and only supported by ELF binaries....; so it can probably be safely removed;
But I just did the most non-invasive change i could think of

@rollerozxa
Copy link
Collaborator

Linking a debug version of Principia with -rdynamic and without produces the exact same binary. So I assume it is entirely safe to remove for all platforms without any debug information being lost.

@rollerozxa rollerozxa marked this pull request as ready for review November 20, 2023 12:19
@rollerozxa rollerozxa changed the title Do not enable -rdynamic on Debug builds on win32 Remove -rdynamic linker flag Nov 20, 2023
@rollerozxa rollerozxa merged commit 73d8ed6 into Bithack:master Nov 20, 2023
3 checks passed
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