build: Use more hidden symbols to fix 32bit boot#21
Merged
dpsmith merged 2 commits intoTrenchBoot:masterfrom Jan 30, 2020
Merged
build: Use more hidden symbols to fix 32bit boot#21dpsmith merged 2 commits intoTrenchBoot:masterfrom
dpsmith merged 2 commits intoTrenchBoot:masterfrom
Conversation
43970d3 to
e1009ba
Compare
krystian-hebel
approved these changes
Jan 28, 2020
Member
krystian-hebel
left a comment
There was a problem hiding this comment.
Tested-by: Krystian Hebel krystian.hebel@3mdeb.com
dpsmith
approved these changes
Jan 30, 2020
-fvisibility=hidden doesn't affect extern's, so use #pragma instead.
{lz,sl}_header, being non-hidden, breaks the 32bit boot because the compiler
emits an indirection through the GOT.
Reported-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
This should catch 32bit builds which emit an indirection through the GOT. Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
{lz,sl}_header being non-hidden breaks the 32bit boot because of a
GOT-relative access and no dynamic linker support.
Update the GLOBAL() macro to hide each symbol (includes _entry), and have the
linker script emit a hidden symbol for _end. This results in no GOT-relative
accesses, which fixes the 32bit boot.
Additionally, move -fvisibility=hidden to be common in the build, and check
for any global non-hidden symbols, to hopefully prevent issues like this in
the future.
Reported-by: Krystian Hebel krystian.hebel@3mdeb.com
Signed-off-by: Andrew Cooper andrew.cooper3@citrix.com