mirror of
https://github.com/vee1e/lancelot.git
synced 2026-09-01 10:48:44 +00:00
coff: collect Data/Text symbols with Unknown section as extern names
The previous commit routed these symbols through the externs table, but they were never added to the table, causing warnings like: coff: reloc: failed to find extern: __cxa_pure_virtual Extend get_coff_extern_names to also collect Data/Text symbols with Unknown sections, so weak externals get assigned entries in the UNDEF section and resolve correctly.
This commit is contained in:
parent
b9cf3adbc8
commit
273bf04377
1 changed files with 3 additions and 1 deletions
|
|
@ -334,7 +334,9 @@ fn get_coff_extern_names(obj: &object::File) -> BTreeSet<String> {
|
|||
match (symbol.kind(), symbol.section()) {
|
||||
(
|
||||
object::SymbolKind::Data | object::SymbolKind::Text,
|
||||
object::SymbolSection::Undefined | object::SymbolSection::Common,
|
||||
object::SymbolSection::Undefined
|
||||
| object::SymbolSection::Common
|
||||
| object::SymbolSection::Unknown,
|
||||
) => {
|
||||
debug!("coff: reloc: extern: symbol: {}", name);
|
||||
externs.insert(name.to_string());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue