• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
      • Axe
      • Execloader
        • Elf-reader
          • Elf64_sym
            • !elf64_sym->value
            • !elf64_sym->shndx
              • !elf64_sym->other
              • !elf64_sym->size
              • !elf64_sym->name
              • !elf64_sym->info
              • Elf64_sym-p
              • Elf64_sym->value
              • Elf64_sym->size
              • Elf64_sym->shndx
              • Elf64_sym->other
              • Elf64_sym->info
              • Elf64_sym-fix
              • Elf64_sym->name
            • 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
    • Elf64_sym

    !elf64_sym->shndx

    Update the |EXLD|::|SHNDX| field of a elf64_sym bit structure.

    Signature
    (!elf64_sym->shndx shndx x) → new-x
    Arguments
    shndx — Guard (elf_bits16-p shndx).
    x — Guard (elf64_sym-p x).
    Returns
    new-x — Type (elf64_sym-p new-x).

    Definitions and Theorems

    Function: !elf64_sym->shndx

    (defun !elf64_sym->shndx (shndx x)
      (declare (xargs :guard (and (elf_bits16-p shndx)
                                  (elf64_sym-p x))))
      (mbe :logic
           (b* ((shndx (mbe :logic (elf_bits16-fix shndx)
                            :exec shndx))
                (x (elf64_sym-fix x)))
             (part-install shndx x
                           :width 16
                           :low 48))
           :exec (the (unsigned-byte 192)
                      (logior (the (unsigned-byte 192)
                                   (logand (the (unsigned-byte 192) x)
                                           (the (signed-byte 65)
                                                -18446462598732840961)))
                              (the (unsigned-byte 64)
                                   (ash (the (unsigned-byte 16) shndx)
                                        48))))))

    Theorem: elf64_sym-p-of-!elf64_sym->shndx

    (defthm elf64_sym-p-of-!elf64_sym->shndx
      (b* ((new-x (!elf64_sym->shndx shndx x)))
        (elf64_sym-p new-x))
      :rule-classes :rewrite)

    Theorem: !elf64_sym->shndx-of-elf_bits16-fix-shndx

    (defthm !elf64_sym->shndx-of-elf_bits16-fix-shndx
      (equal (!elf64_sym->shndx (elf_bits16-fix shndx)
                                x)
             (!elf64_sym->shndx shndx x)))

    Theorem: !elf64_sym->shndx-elf_bits16-equiv-congruence-on-shndx

    (defthm !elf64_sym->shndx-elf_bits16-equiv-congruence-on-shndx
      (implies (elf_bits16-equiv shndx shndx-equiv)
               (equal (!elf64_sym->shndx shndx x)
                      (!elf64_sym->shndx shndx-equiv x)))
      :rule-classes :congruence)

    Theorem: !elf64_sym->shndx-of-elf64_sym-fix-x

    (defthm !elf64_sym->shndx-of-elf64_sym-fix-x
      (equal (!elf64_sym->shndx shndx (elf64_sym-fix x))
             (!elf64_sym->shndx shndx x)))

    Theorem: !elf64_sym->shndx-elf64_sym-equiv-congruence-on-x

    (defthm !elf64_sym->shndx-elf64_sym-equiv-congruence-on-x
      (implies (elf64_sym-equiv x x-equiv)
               (equal (!elf64_sym->shndx shndx x)
                      (!elf64_sym->shndx shndx x-equiv)))
      :rule-classes :congruence)

    Theorem: !elf64_sym->shndx-is-elf64_sym

    (defthm !elf64_sym->shndx-is-elf64_sym
      (equal (!elf64_sym->shndx shndx x)
             (change-elf64_sym x :shndx shndx)))

    Theorem: elf64_sym->shndx-of-!elf64_sym->shndx

    (defthm elf64_sym->shndx-of-!elf64_sym->shndx
      (b* ((?new-x (!elf64_sym->shndx shndx x)))
        (equal (elf64_sym->shndx new-x)
               (elf_bits16-fix shndx))))

    Theorem: !elf64_sym->shndx-equiv-under-mask

    (defthm !elf64_sym->shndx-equiv-under-mask
      (b* ((?new-x (!elf64_sym->shndx shndx x)))
        (elf64_sym-equiv-under-mask new-x x -18446462598732840961)))