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

-g is unfriendly to shared libraries and PIEs #531

Open
crrodriguez opened this issue Feb 8, 2025 · 2 comments
Open

-g is unfriendly to shared libraries and PIEs #531

crrodriguez opened this issue Feb 8, 2025 · 2 comments

Comments

@crrodriguez
Copy link

https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html

-g should generate code using the "alternate way" documented in the GCC manual to make the generated code friendly with shared libraries and also safer since it is gonna become read only data. It will probably run faster too on most modern systems.

@skvadrik
Copy link
Owner

skvadrik commented Feb 8, 2025

Thanks for reporting this! It seems that there is one incompatibility (a quote from https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html):

This alternative with label differences is not supported for the AVR target, please use the first approach for AVR programs.

We can definitely add another option and configuration though.

@crrodriguez
Copy link
Author

It could however be guarded with ifndef AVR or something similar..

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

No branches or pull requests

2 participants