Get all symbol table entries, with names mapped to entries in the string table
(get-symtab-entries elf) → elf-entries
Function:
(defun get-symtab-entries (elf) (declare (xargs :stobjs (elf))) (declare (xargs :guard t)) (let ((__function__ 'get-symtab-entries)) (declare (ignorable __function__)) (b* ((elf-header (@elf-header elf)) (sections (@sections elf)) ((section-info symtab-section) (get-section-info ".symtab" sections)) ((section-info strtab-section) (get-section-info ".strtab" sections)) ((elf-section-header symtab-header) symtab-section.header) (elf64? (equal (elf-header->class elf-header) 2)) (symtab-entries (parse-symtab-entries elf64? symtab-header.entsize symtab-section.bytes strtab-section.bytes))) symtab-entries)))
Theorem:
(defthm elf32_sym-info-list-p-of-get-symtab-entries (b* ((?elf-entries (get-symtab-entries elf))) (implies (not (equal (elf-header->class (@elf-header elf)) 2)) (elf32_sym-info-list-p elf-entries))))
Theorem:
(defthm elf64_sym-info-list-p-of-get-symtab-entries (b* ((?elf-entries (get-symtab-entries elf))) (implies (equal (elf-header->class (@elf-header elf)) 2) (elf64_sym-info-list-p elf-entries))))