-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add documentation for linker errors around static
functions and linker scripts
#484
Conversation
docs/usage.md
Outdated
Note also that an `__attribute__((visibility ("hidden")))` annotation can have | ||
the same effect as hiding the symbol in a linker script. Such annotation will | ||
have to be removed to work in a containerized app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was closed by mistake. There's some edge case we still don't support but I don't remember at the moment. IIRC adding the flag to the test suite should point it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm, interesting I didn't realize we had already resolved part of this. I'm trying to reproduce the issues I'm documenting here and it seems like maybe these docs are now redundant?
__attribute__((used))
is now being inserted correctly for static functions whenstatic
comes from inside a macro.- Functions marked with
__attribute__((visibility ("hidden")))
now link correctly.
I still need to test if the issue with a version script is also fixed, but if it is I think we can close this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the fix for visibility("hidden")
also addressed the issue with having a linker script mark a symbol local
? Or at least the issue was fixed at some point because I can now include the zlib linker script in the compartmentalized build and I no longer hit the linker errors I originally saw. So I'm going to close this and the related bugs.
The issues this PR documents no longer seem to be happening (see #484 (comment)), so I'm going to close this PR. |
This (at least partially) addresses #414 and #415 by adding docs around those potential error cases. This covers the cases that I ran into working on zlib.