Merge branch 'weak-symbols' into 'master'
Weak symbols See merge request redox-os/relibc!260
This commit is contained in:
@@ -108,9 +108,9 @@ pub unsafe extern "C" fn dlsym(handle: *mut c_void, symbol: *const c_char) -> *m
|
||||
eprintln!("dlsym: linker_ptr: {:p}", tcb.linker_ptr);
|
||||
let linker = (&*tcb.linker_ptr).lock();
|
||||
|
||||
if let Some(global) = linker.globals.get(symbol_str) {
|
||||
eprintln!("dlsym({:p}, {}) = 0x{:x}", handle, symbol_str, *global);
|
||||
*global as *mut c_void
|
||||
if let Some(global) = linker.get_sym(symbol_str) {
|
||||
eprintln!("dlsym({:p}, {}) = 0x{:x}", handle, symbol_str, global);
|
||||
global as *mut c_void
|
||||
} else {
|
||||
eprintln!("dlsym: symbol not found");
|
||||
ERROR.store(ERROR_NOT_SUPPORTED.as_ptr() as usize, Ordering::SeqCst);
|
||||
|
||||
@@ -5,7 +5,8 @@ use core::{convert::TryFrom, mem, ptr, slice};
|
||||
use crate::{
|
||||
c_str::CStr,
|
||||
header::{
|
||||
errno, fcntl, limits, stdlib::getenv, sys_ioctl, sys_time, sys_utsname, termios, time::timespec,
|
||||
errno, fcntl, limits, stdlib::getenv, sys_ioctl, sys_time, sys_utsname, termios,
|
||||
time::timespec,
|
||||
},
|
||||
platform::{self, types::*, Pal, Sys},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user