fixup symbol export
This commit is contained in:
parent
489d9886e3
commit
45869fdd30
4 changed files with 69 additions and 19 deletions
ltcc/src
|
@ -53,6 +53,18 @@ fn main() {
|
|||
.export()
|
||||
.into_iter()
|
||||
.filter_map(|(symbol, def)| match def {
|
||||
ltcore::symbols::SymbolDef::StaticRef { typ, link_addr, export } => {
|
||||
eprintln!("runtime export static REF {}", export);
|
||||
if export {
|
||||
if let Some(addr)= link_addr {
|
||||
Some((symbol, addr))
|
||||
} else {
|
||||
Some((symbol.clone(), runtime_linker.get_link_addr(&symbol).unwrap_or(-1)))
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
ltcore::symbols::SymbolDef::Procedure { in_types:_, out_types:_, link_addr, export } => {
|
||||
if true {
|
||||
match link_addr {
|
||||
|
@ -198,6 +210,17 @@ fn main() {
|
|||
.export()
|
||||
.into_iter()
|
||||
.filter_map(|(symbol, def)| match def {
|
||||
ltcore::symbols::SymbolDef::StaticRef { typ, link_addr, export } => {
|
||||
if export {
|
||||
if let Some(addr)= link_addr {
|
||||
Some((symbol.clone(), addr))
|
||||
} else {
|
||||
Some((symbol.clone(), linker.get_link_addr(&symbol).unwrap_or(-1)))
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
ltcore::symbols::SymbolDef::Procedure { in_types:_, out_types:_, link_addr, export } => {
|
||||
if export {
|
||||
match link_addr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue