Skip to content

Commit

Permalink
Merge pull request gimli-rs#247 from bjorn3/elf_write_weak_fix
Browse files Browse the repository at this point in the history
write/elf: Check symbol.weak before symbol.is_undefined()
  • Loading branch information
philipc committed Aug 18, 2020
2 parents caa91db + 44c4789 commit 7f45093
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/write/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,12 @@ impl Object {
}
}
};
let st_bind = if symbol.is_undefined() {
let st_bind = if symbol.weak {
elf::STB_WEAK
} else if symbol.is_undefined() {
elf::STB_GLOBAL
} else if symbol.is_local() {
elf::STB_LOCAL
} else if symbol.weak {
elf::STB_WEAK
} else {
elf::STB_GLOBAL
};
Expand Down

0 comments on commit 7f45093

Please sign in to comment.