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

Fixup versioning for simics APIs and add versioned tests #75

Merged
merged 17 commits into from
Apr 11, 2024

Conversation

novafacing
Copy link
Contributor

Fixes up versioning of API functions to use a standard version-oriented cfg() system instead of the semi-bespoke approach used right now.

@novafacing
Copy link
Contributor Author

novafacing commented Apr 11, 2024

This PR now also replaces the use of patchelf in the Fedora 20 builder image with an updated linker (builds ldd 5.0.2 from source).

Some motivation for posterity:

The original motivation for using patchelf is that ld.bfd on Fedora 20 interpreted cargo:rustc-link-lib and cargo:rustc-link-search directives in an unexpected way, resulting in a DT_NEEDED entry /absolute/path/to/libsimics-common.so. We used patchelf to replace this entry with libsimics-common.so, but this operation corrupted the ELF file in such a way that newer (verified on 2.38) versions of ld.so would load it correctly, but older (e.g. glibc 2.17) versions would not, complaining about misaligned ELF headers/instructions. This works fine for any modern system, but some users are on legacy systems. Removing the use of patchelf and using ld.ldd v5.0.2 fixes the issue, because ld.ldd 5.0.2 correctly emits those DT_NEEDED sections in the first place.

Copy link

@tklengyel tklengyel left a comment

Choose a reason for hiding this comment

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

Couple minor things, otherwise LGTM

@novafacing novafacing merged commit d3072c1 into intel:main Apr 11, 2024
16 checks passed
@novafacing novafacing deleted the api-versioning branch April 11, 2024 19:43
novafacing pushed a commit to novafacing/tsffs that referenced this pull request May 28, 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.

2 participants