gcc: defer L4Re loader symbols to runtime in LINK_SPEC#318
Open
sixtyfourktec wants to merge 1 commit into
Open
gcc: defer L4Re loader symbols to runtime in LINK_SPEC#318sixtyfourktec wants to merge 1 commit into
sixtyfourktec wants to merge 1 commit into
Conversation
The dynamic-executable LINK_SPEC sets /rom/libld-l4.so.1 as the interpreter but does not allow undefined symbols in shared libraries. L4Re's libc.so carries no DT_NEEDED on the loader, so ld cannot resolve the loader-provided symbols (_dl_*, l4re_global_env, l4_global_kip, l4re_env_posix_vfs_ops) at link time and a plain link fails. Add --allow-shlib-undefined to the dynamic-exe branch so these symbols are bound at load time by the interpreter, matching what the libc -> ld-linux DT_NEEDED chain achieves implicitly on GNU/Linux. Signed-off-by: Christian Pötzsch <christian.poetzsch@kernkonzept.com>
Member
|
I guess it makes more sense to fix L4Re's uclibc build? This workaround doesn't feel right. Especially since other systems don't need them... |
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.
The dynamic-executable LINK_SPEC sets /rom/libld-l4.so.1 as the interpreter but does not allow undefined symbols in shared libraries. L4Re's libc.so carries no DT_NEEDED on the loader, so ld cannot resolve the loader-provided symbols (dl*, l4re_global_env, l4_global_kip, l4re_env_posix_vfs_ops) at link time and a plain link fails.
Add --allow-shlib-undefined to the dynamic-exe branch so these symbols are bound at load time by the interpreter, matching what the libc -> ld-linux DT_NEEDED chain achieves implicitly on GNU/Linux.