(find-label-address-from-elf-symtab-info elf64 label info) → addr
Function:
(defun find-label-address-from-elf-symtab-info (elf64 label info) (declare (xargs :guard (and (booleanp elf64) (stringp label)))) (declare (xargs :guard (if elf64 (elf64_sym-info-list-p info) (elf32_sym-info-list-p info)))) (let ((__function__ 'find-label-address-from-elf-symtab-info)) (declare (ignorable __function__)) (b* (((when (atom info)) nil) (i (car info)) (name (if elf64 (elf64_sym-info->name-str i) (elf32_sym-info->name-str i))) ((if (equal name label)) (if elf64 (elf64_sym->value (elf64_sym-info->entry i)) (elf32_sym->value (elf32_sym-info->entry i))))) (find-label-address-from-elf-symtab-info elf64 label (cdr info)))))
Theorem:
(defthm maybe-natp-of-find-label-address-from-elf-symtab-info (implies (and (booleanp elf64) (stringp label) (if elf64 (elf64_sym-info-list-p info) (elf32_sym-info-list-p info))) (b* ((addr (find-label-address-from-elf-symtab-info elf64 label info))) (acl2::maybe-natp addr))) :rule-classes :rewrite)