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