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

Remove zeroes binary from test_archive_non_objects #12419

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

aheejin
Copy link
Member

@aheejin aheejin commented Oct 2, 2020

This test was added in #10300 to check if we can handle non-objects in
archives, especially rust metadata files that start with two leading
zeroes. LLVM's file magic identifier thinks files with two leading
zeroes are COFF files. But Rust metadata files used to start with two
leading zeroes too, resulting in an error in LLVM tools. So #10300
bypassed use of llvm-nm to avoid that.

We were still using llvm-ranlib, which also ran the LLVM magic
identifier when trying to create a symbol table for an object, but
llvm-ranlib so far has ignored those errors. But recently
llvm/llvm-project@a20168d
made them explicit errors, so we couldn't run llvm-ranlib anymore with
archives containing objects that start with two leading zeroes.

But this is not relevant anymore because Rust fixed their object file
format in rust-lang/rust#66235, so their files are not mistaken by LLVM
for COFF files anymore. So this PR fixes this test to not include a
binary with two leading zeros, while still testing archival of
non-object files.

This test was added in emscripten-core#10300 to check if we can handle non-objects in
archives, especially rust metadata files that start with two leading
zeroes. LLVM's file magic identifier thinks files with two leading
zeroes are COFF files. But Rust metadata files used to start with two
leading zeroes too, resulting in an error in LLVM tools. So emscripten-core#10300
bypassed use of `llvm-nm` to avoid that.

We were still using `llvm-ranlib`, which also ran the LLVM magic
identifier when trying to create a symbol table for an object, but
`llvm-ranlib` so far has ignored those errors. But recently
llvm/llvm-project@a20168d
made them explicit errors, so we couldn't run `llvm-ranlib` anymore with
archives containing objects that start with two leading zeroes.

But this is not relevant anymore because Rust fixed their object file
format in rust-lang/rust#66235, so their files are not mistaken by LLVM
for COFF files anymore. So this PR fixes this test to not include a
binary with two leading zeros, while still testing archival of
non-object files.
@aheejin aheejin requested a review from sbc100 October 2, 2020 22:37
@aheejin aheejin merged commit 9bb322f into emscripten-core:master Oct 2, 2020
@aheejin aheejin deleted the remove_zeroes branch October 2, 2020 23:27
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