about summary refs log tree commit diff
path: root/library/core/src/ptr/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-01-16 02:31:22 +0000
committerbors <bors@rust-lang.org>2025-01-16 02:31:22 +0000
commit5cd16b7f2bc3624f2d658aa87151279878d2652a (patch)
tree6180a5f11979ce30f0495a64c57ca6d265a4f670 /library/core/src/ptr/mod.rs
parent6fc8a27931b3806d38143c518c91c7f97b4cfb83 (diff)
parent98f673e93a47b33a451f6b2cd99e5d5b03b57563 (diff)
downloadrust-5cd16b7f2bc3624f2d658aa87151279878d2652a.tar.gz
rust-5cd16b7f2bc3624f2d658aa87151279878d2652a.zip
Auto merge of #135458 - jieyouxu:migrate-extern-fn-reachable, r=lqd
tests: Port `extern-fn-reachable` to rmake.rs

Part of #121876.

## Summary

This PR ports `tests/run-make/extern-fn-reachable` to use `rmake.rs`. Notable changes:

- We now use the `object` crate and look at the exported symbols specifically.
- This test's coverage regressed against windows-msvc back in [replace dynamic library module with libloading #90716](https://github.com/rust-lang/rust/pull/90716), but since we use `object` now, we're able to claw the test coverage back.
- The checks are now stricter:
    1. It no longer looks for substring symbol matches in `nm` textual outputs, it inspects the symbol names precisely.
    2. We now also explicitly check for the presence of leading underscore in exported symbol names on apple vs non-apple targets.
- Added another case of `#[no_mangle] fn fun6() {}` (note the lack of `pub`) to check that Rust nameres visibility is orthogonal to symbol visibility in dylib.

## History

- Test was initially introduced as a run-pass[^run-pass] test as part of [Don't mark reachable extern fns as internal #10539](https://github.com/rust-lang/rust/pull/10539).
- Test re-introduced as a run-make test in https://github.com/rust-lang/rust/pull/13741.
- Later, the test coverage regressed in https://github.com/rust-lang/rust/pull/90716.

[^run-pass]: no longer a thing nowadays

Supersedes #128314.
Co-authored with `@lolbinarycat.`

try-job: x86_64-msvc
try-job: i686-msvc
try-job: i686-mingw
try-job: x86_64-mingw-1
try-job: x86_64-apple-1
try-job: aarch64-apple
try-job: test-various
Diffstat (limited to 'library/core/src/ptr/mod.rs')
0 files changed, 0 insertions, 0 deletions