-
Notifications
You must be signed in to change notification settings - Fork 93
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
elfloader: issues with Arm's linker script #172
Comments
Since a0ffb71, the script has been a fragment that's applied to the linker's builtin default script. I think historically the same script was used for both EFI and non-EFI targets which complicated having a complete script. Now the EFI builds use their own script so it'd probably be possible to provide a simple, but complete, one like the kernel. I'm happy if you want to put up a PR for this :) |
heshamelmatary
added a commit
to CTSRD-CHERI/seL4_tools
that referenced
this issue
Jul 26, 2023
When building with LLVM/lld, they trigger a linking error as .hash and .interp don't exist. Closes seL4#172 Sponsored by: DARPA. Signed-off-by: Hesham Almatary <[email protected]>
heshamelmatary
added a commit
to CTSRD-CHERI/seL4_tools
that referenced
this issue
Jul 26, 2023
When building with LLVM/lld, they trigger a linking error as .hash and .interp don't exist. Closes seL4#172 Sponsored by: DARPA. Signed-off-by: Hesham Almatary <[email protected]>
heshamelmatary
added a commit
to CTSRD-CHERI/seL4_tools
that referenced
this issue
Jul 27, 2023
When building with LLVM/lld, they trigger a linking error as .hash and .interp don't exist. Closes seL4#172 Sponsored by: DARPA. Signed-off-by: Hesham Almatary <[email protected]>
heshamelmatary
added a commit
to CTSRD-CHERI/seL4_tools
that referenced
this issue
Jan 8, 2024
When building with LLVM/lld, they trigger a linking error as .hash and .interp don't exist. Closes seL4#172 Sponsored by: DARPA. Signed-off-by: Hesham Almatary <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The shared Arm's linker script includes some sections and directive that might not be necessary. For example,
.interp
and.hash
here:SECTIONS { .interp : { *(.interp) } } INSERT BEFORE .hash;
What's the reason this section exists in the elfloader, and why the
INSERT BEFORE .hash
? I am able to remove them and ELF linking works just fine. However, when building with LLVM/lld, they trigger a linking error as.hash and .interp
don't exist.aarch64-none-elf-ld.lld: error: unable to insert .interp before .hash aarch64-none-elf-ld.lld: error: unable to insert ._archive_cpio after .eh_frame
Similarly,
INSERT AFTER .eh_frame;
I do have local fixes that remove them, I'd be happy to submit a PR if there's no good reason those sections/directives exist.
The text was updated successfully, but these errors were encountered: