Skip to content
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

libmicrokit: fix to successfully link on LLD #62

Merged
merged 2 commits into from
Jan 11, 2024
Merged

Conversation

Ivan-Velickovic
Copy link
Collaborator

LLD does not recognise the STARTUP directive which works with the GNU linker. Given that the crt0.s entry point is already specified to be at the start of the _text section when linking with libmicrokit, all we need to do is slightly change the Makefile to also include crt0.o when linking to produce libmicrokit.a

@Ivan-Velickovic
Copy link
Collaborator Author

Should have an example that shows using LLVM tools to compile PD ELFs for both education reasons and as well as testing that it actually works.

LLD does not recognise the STARTUP directive which works with the
GNU linker. Given that the crt0.s entry point is already specified
to be at the start of the _text section when linking with libmicrokit,
all we need to do is slightly change the Makefile to also include
crt0.o when linking to produce libmicrokit.a

Signed-off-by: Ivan Velickovic <[email protected]>
Previously the linker script referred to crt0.o which is why it was
necessary that it was part of the SDK. However, now libmicrokit.a
contains crt0.o and so it is not necessary to continue distributing
crt0.o separately.

Signed-off-by: Ivan Velickovic <[email protected]>
@Ivan-Velickovic Ivan-Velickovic merged commit d0f9718 into main Jan 11, 2024
8 checks passed
@Ivan-Velickovic Ivan-Velickovic deleted the libmicrokit_lld branch January 11, 2024 07:15
@Ivan-Velickovic Ivan-Velickovic mentioned this pull request Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant