-
Notifications
You must be signed in to change notification settings - Fork 0
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
Version scripts that hide symbols break linkage for compartmentalized builds #415
Comments
The zlib linker script can be seen here: https://github.com/immunant/zlib/blob/1849c2400150304c100af9d3e3b9b92ac0337290/zlib.map |
The problem here is basically the same thing as 414 (missing the right type of callgate), but I'm not sure this can be fixed in the rewriter alone. Basically we'll need something similar to |
I think this is just something we need to document in the usage docs. The user will have to do some additional source annotation (e.g. add the |
Right, though I don't think the used annotation by itself does the right thing here. |
The simplest thing I can think of is a CLI param for the rewriter that tells it to treat a symbol as internal. Were you thinking of adding an annotation to the sources instead, Ayrton? That works too, probably cleaner, but technically the linker script allows the build system to hide the symbol independently from the source file, so in some configurations it might and in some it might not. |
If a project has a function
foo
that is used as an address-taken function that has been rewritten by the rewriter, and the project uses a linker script to markfoo
local, then the function gates inlibcallgates.so
will generate linker errors when they can't findfoo
in the compartmentalized library. Note that this is basically the same error as in #414, but caused by a linker script instead of astatic
modifier.The text was updated successfully, but these errors were encountered: