(cx: &AnalysisCtxt<'tcx>, path: &Path)
| 11 | pub(crate) mod stack_size; |
| 12 | |
| 13 | pub fn binary_analysis<'tcx>(cx: &AnalysisCtxt<'tcx>, path: &Path) { |
| 14 | let file = File::open(path).unwrap(); |
| 15 | let meta = file.metadata().unwrap(); |
| 16 | if !meta.is_file() { |
| 17 | // We cannot handle special devices (this can be e.g. /dev/null). |
| 18 | return; |
| 19 | } |
| 20 | |
| 21 | let mmap = unsafe { rustc_data_structures::memmap::Mmap::map(file) }.unwrap(); |
| 22 | let object = ObjectFile::parse(&*mmap).unwrap(); |
| 23 | |
| 24 | build_error::build_error_detection(cx, &object); |
| 25 | stack_size::stack_size_check(cx, &object); |
| 26 | } |
| 27 | |
| 28 | fn find_symbol_from_section_offset<'obj>( |
| 29 | file: &ObjectFile<'obj>, |
no test coverage detected