Skip to content

elf-raw-dylib: set type for functions#153090

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
mati865:elf-raw-dylib-fns
Mar 2, 2026
Merged

elf-raw-dylib: set type for functions#153090
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
mati865:elf-raw-dylib-fns

Conversation

@mati865
Copy link
Member

@mati865 mati865 commented Feb 25, 2026

Avoids GNU ld warnings like:

type and size of dynamic symbol `meooooooooooooooow' are not defined

First noticed in #152451 (comment) with changes from #149937.

Avoids GNU ld warnings like:
```
type and size of dynamic symbol `meooooooooooooooow' are not defined
```
First noticed in
rust-lang#152451 (comment)
with changes from rust-lang#149937.
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 25, 2026
stub.write_null_dynamic_symbol();
for (_name, dynstr, _ver) in syms.iter().copied() {
for (_name, dynstr, _ver, is_fn) in syms.iter().copied() {
let sym_type = if is_fn { elf::STT_FUNC } else { elf::STT_NOTYPE };
Copy link
Member

Choose a reason for hiding this comment

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

Should we use STT_OBJECT for statics and STT_TLS for #[thread_local] statics?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I was wondering whether STT_OBJECT is important. Even though it doesn't matter for Wild, it might be useful for other linkers.
Good point about TLS. I forgot about it, but it's relevant.

I'd see those changes as follow-ups (let me know if you want to take care of it). This change is a low-hanging fruit to quickly help with #149937.

@mati865 mati865 marked this pull request as ready for review February 27, 2026 09:59
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 27, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 27, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 27, 2026

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: codegen, compiler
  • codegen, compiler expanded to 68 candidates
  • Random selection from 14 candidates

@TaKO8Ki
Copy link
Member

TaKO8Ki commented Mar 2, 2026

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 2, 2026

📌 Commit 30fc9bd has been approved by TaKO8Ki

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 2, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 2, 2026
elf-raw-dylib: set type for functions

Avoids GNU ld warnings like:
```
type and size of dynamic symbol `meooooooooooooooow' are not defined
```
First noticed in rust-lang#152451 (comment) with changes from rust-lang#149937.
rust-bors bot pushed a commit that referenced this pull request Mar 2, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #153169 (Various small query cleanups)
 - #152304 (stabilize new RangeToInclusive type)
 - #153046 (Couple of cg_ssa refactorings)
 - #153090 (elf-raw-dylib: set type for functions)
 - #153225 (tests/ui/asm: add annotations for reference rules)
 - #153233 (test: add regression test for fuzzy_provenance_casts lint ICE)
@rust-bors rust-bors bot merged commit 09b8f72 into rust-lang:main Mar 2, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 2, 2026
rust-timer added a commit that referenced this pull request Mar 2, 2026
Rollup merge of #153090 - mati865:elf-raw-dylib-fns, r=TaKO8Ki

elf-raw-dylib: set type for functions

Avoids GNU ld warnings like:
```
type and size of dynamic symbol `meooooooooooooooow' are not defined
```
First noticed in #152451 (comment) with changes from #149937.
@mati865 mati865 deleted the elf-raw-dylib-fns branch March 5, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants