5 #[derive(Debug, Copy, Clone)]
9 // Returns an error for unsupported symbols, and None if this symbol
10 // should become a NULL pointer (pretend it does not exist).
11 pub fn from_str<'tcx>(name: &str) -> InterpResult<'tcx, Option<Dlsym>> {
13 "__pthread_get_minstack" => None,
14 "getrandom" => None, // std falls back to syscall(SYS_getrandom, ...) when this is NULL.
15 "statx" => None, // std falls back to syscall(SYS_statx, ...) when this is NULL.
16 _ => throw_unsup_format!("unsupported Linux dlsym: {}", name),
21 impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriEvalContext<'mir, 'tcx> {}
22 pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx> {
26 _args: &[OpTy<'tcx, Tag>],
27 _dest: &PlaceTy<'tcx, Tag>,
28 ret: Option<mir::BasicBlock>,
29 ) -> InterpResult<'tcx> {
30 let this = self.eval_context_mut();
31 let _ret = ret.expect("we don't support any diverging dlsym");
32 assert!(this.tcx.sess.target.os == "linux");