Skip to content

[ELF] Don't pass ELF shared objects to autolink-extract #1407

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

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

drodriguez
Copy link
Contributor

This is a version of swiftlang/swift#30465 for the new driver.

Since shared objects are classified as .object, they end up getting passed to the autolink-extract job.

For ELF platforms, this is unnecessary, since the autolink entries are not in the final shared object, so the autolink-extract process will not find any entries.

Additionally, in ELF platforms, .so files can actually be linker scripts (text files) with instructions for the actual linker, which the autolink-extract job will not understand and will fail.

For those two reasons, modify the autolink-extract inputs to skip over objects in ELF platforms that have the .so extension.

@drodriguez
Copy link
Contributor Author

@swift-ci please test

@compnerd compnerd requested a review from artemcm August 21, 2023 17:34
This is a version of swiftlang/swift#30465 for the new driver.

Since shared objects are classified as `.object`, they end up getting
passed to the autolink-extract job.

For ELF platforms, this is unnecessary, since the autolink entries are
not in the final shared object, so the autolink-extract process will not
find any entries.

Additionally, in ELF platforms, `.so` files can actually be linker
scripts (text files) with instructions for the actual linker, which the
autolink-extract job will not understand and will fail.

For those two reasons, modify the autolink-extract inputs to skip over
objects in ELF platforms that have the `.so` extension.
@drodriguez drodriguez force-pushed the elf-so-autolink-extract branch from 479ff34 to d134679 Compare September 7, 2023 19:30
@drodriguez
Copy link
Contributor Author

@swift-ci please test

@drodriguez
Copy link
Contributor Author

I don't have permissions to merge into this repo. Can someone be kindly enough to do it for me? Thanks!

@compnerd compnerd merged commit ac85d40 into swiftlang:main Sep 8, 2023
@drodriguez drodriguez deleted the elf-so-autolink-extract branch September 8, 2023 15:44
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.

3 participants