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

plat/common/x86: Fix libukreloc error for non-PIE SMP builds #1037

Closed

Conversation

mogasergiu
Copy link
Member

@mogasergiu mogasergiu commented Aug 11, 2023

After the merge of
commit cf8cc65 ("plat/kvm/x86: Make SMP init code resolve its own start16 relocations") SMP builds that were not built with libukreloc would fail due to external references to x86_start16_* symbols no longer being declared.

Thus, fix this by making their declaration present regardless of CONFIG_LIBUKRELOC being enabled or not. Furthermore, guard the no longer necessary START16_UKRELOC_* macro's, as they are not needed if the previously mentioned configuration is not enabled.

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran the checkpatch.uk on your commit series before opening this PR;
  • Updated relevant documentation.

Base target

  • Architecture(s): [e.g. x86_64 or N/A]
  • Platform(s): [e.g. kvm, xen or N/A]
  • Application(s): [e.g. app-python3 or N/A]

Additional configuration

Description of changes

After the merge of
commit cf8cc65 ("plat/kvm/x86: Make SMP init code resolve its own `start16` relocations")
SMP builds that were not built with `libukreloc` would fail due to
external references to `x86_start16_*` symbols no longer being declared.

Thus, fix this by making their declaration present regardless of
`CONFIG_LIBUKRELOC` being enabled or not. Furthermore, guard the no
longer necessary `START16_UKRELOC_*` macro's, as they are not needed
if the previously mentioned configuration is not enabled.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
@mogasergiu mogasergiu requested a review from a team as a code owner August 11, 2023 12:51
Copy link
Member

@mschlumpp mschlumpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Marco Schlumpp marco@unikraft.io

@razvand razvand self-assigned this Aug 11, 2023
@razvand razvand added plat/kvm Unikraft for KVM arch/x86_64 labels Aug 11, 2023
@razvand razvand added this to the v0.14.0 (Prometheus) milestone Aug 11, 2023
@razvand razvand removed the request for review from a team August 11, 2023 13:55
Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved-by: Razvan Deaconescu razvand@unikraft.io

@unikraft-bot unikraft-bot added the ci/merged Merged by CI label Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch/x86_64 ci/merged Merged by CI plat/kvm Unikraft for KVM
Projects
Status: Done!
Development

Successfully merging this pull request may close these issues.

None yet

4 participants