• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
      • Axe
      • Execloader
        • Elf-reader
          • Elf64_sym
          • Elf32_sym
          • Elf-header
          • Elf-section-header
          • Elf64-segment-header
          • Elf32-segment-header
          • Elf_bits32
          • Elf_bits8
          • Elf_bits64
          • Elf_bits16
          • Section-info
          • Read-section-headers
          • Read-segment-headers-64
          • Read-segment-headers-32
          • Read-section-names
          • Elf64_sym-info
          • Elf32_sym-info
          • Read-elf-header
          • Parse-symtab-entries
          • Populate-elf-contents
          • Is-elf-content-p
          • Get-string-section-data
          • Get-section-info1
          • Set-elf-stobj-fields
          • Get-named-section-headers
          • Elf-read-mem-null-term
          • Get-section-info
          • Get-symtab-entries
          • Find-label-address-from-elf-symtab-info
          • Section-names
            • Populate-elf
            • Get-label-addresses
            • Elf-read-string-null-term
            • Get-label-address
            • Good-elf-p
            • Elf64_sym-equiv-under-mask
            • Elf64-segment-headers
            • Elf32_sym-equiv-under-mask
            • Elf32-segment-headers
            • Section-info-list
            • Elf64_sym-info-list
            • Elf32_sym-info-list
            • Elf-section-headers
            • Elf64_sym-debug
            • Elf32_sym-debug
          • Mach-o-reader
          • Merge-first-split-bytes
          • Split-bytes
          • Take-till-zero
          • Charlist->bytes
          • Merge-bytes
          • Bytes->charlist
          • String->bytes
          • Bytes->string
      • Math
      • Testing-utilities
    • Elf-reader

    Section-names

    Get all names from sections in section-info-list

    Signature
    (section-names section-info-list) → sec-names
    Arguments
    section-info-list — Guard (section-info-list-p section-info-list).
    Returns
    sec-names — Type (string-listp sec-names), given the guard.

    Definitions and Theorems

    Function: section-names

    (defun section-names (section-info-list)
      (declare (xargs :guard (section-info-list-p section-info-list)))
      (let ((__function__ 'section-names))
        (declare (ignorable __function__))
        (b* (((when (atom section-info-list)) nil)
             ((section-info section-info)
              (car section-info-list))
             ((elf-section-header section-info.header)))
          (cons section-info.header.name-str
                (section-names (cdr section-info-list))))))

    Theorem: string-listp-of-section-names

    (defthm string-listp-of-section-names
      (implies (and (section-info-list-p section-info-list))
               (b* ((sec-names (section-names section-info-list)))
                 (string-listp sec-names)))
      :rule-classes :rewrite)

    Theorem: cdr-section-names

    (defthm cdr-section-names
      (equal (section-names (cdr sec-info-list))
             (cdr (section-names sec-info-list))))