forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#137426 - DianQK:link-used, r=<try>
Link object files that use `#[used]` By directly linking the object files that use `#[used]`, we ensure the linker can see them. This approach allows `#[used]` to avoid modifying symbol visibility, preserving local symbols. A similar example in C would be: ```c // foo.c __attribute__((constructor)) static void foo() {} // main.c void main(void) {} ``` If `foo.c` is placed in a static library, it will never be loaded unless the entire static library is fully loaded by `--whole-archive`. This pull request removes some of the symbols in `symbols.o`. We can remove more symbols in a follow-up PR.
- Loading branch information
Showing
15 changed files
with
282 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.