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

Fix Clang/LLD woes! #343

Closed
wants to merge 1 commit into from
Closed

Fix Clang/LLD woes! #343

wants to merge 1 commit into from

Conversation

ybhvf
Copy link

@ybhvf ybhvf commented Jan 1, 2022

Several changes to get Clang and LLD working again (GH-180):

  • LLD will always place non-allocated sections at LMA(0x0). Flagged the .zip
    section as 'a' to fix this.
  • LLD interprets DEFINED(x) in a subtly-different way, where any symbol
    declaration counts as defining. Changed several default-value
    definitions that used DEFINED to instead use PROVIDE_HIDDEN.
  • Due to the same LLD/DEFINED behavior, EfiMain was always getting
    linked in. Updated to use a separate flagging variable (USE_EFI).
  • Clang needed a few new flags to match GCC frame/stack behavior.

Several changes to get Clang and LLD working again:

- LLD will always place non-allocated sections at LMA(0x0). Flagged the .zip
  section as 'a' to fix this.
- LLD interprets DEFINED(x) in a subtly-different way, where any symbol
  declaration counts as defining. Changed several default-value
  definitions that used DEFINED to instead use PROVIDE_HIDDEN.
- Due to the same LLD/DEFINED behavior, EfiMain was always getting
  linked in. Updated to use a separate flagging variable (USE_EFI).
- Clang needed a few new flags to match GCC frame/stack behavior.
@jart
Copy link
Owner

jart commented Apr 6, 2022

Thank you but after giving it some thought I've decided that I want to delete the commented Clang/LLD code for the time being. Even when it was working it caused a lot of issues for Linux users.

@jart jart closed this Apr 6, 2022
jart added a commit that referenced this pull request Apr 6, 2022
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.

2 participants