• 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
          • Elf32_sym
            • !elf32_sym->value
            • !elf32_sym->size
            • !elf32_sym->shndx
              • !elf32_sym->other
              • Elf32_sym-p
              • !elf32_sym->name
              • !elf32_sym->info
              • Elf32_sym->value
              • Elf32_sym->size
              • Elf32_sym->shndx
              • Elf32_sym->other
              • Elf32_sym->info
              • Elf32_sym-fix
              • Elf32_sym->name
            • 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
    • Elf32_sym

    !elf32_sym->shndx

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

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

    Definitions and Theorems

    Function: !elf32_sym->shndx

    (defun !elf32_sym->shndx (shndx x)
     (declare (xargs :guard (and (elf_bits16-p shndx)
                                 (elf32_sym-p x))))
     (mbe
      :logic
      (b* ((shndx (mbe :logic (elf_bits16-fix shndx)
                       :exec shndx))
           (x (elf32_sym-fix x)))
        (part-install shndx x
                      :width 16
                      :low 112))
      :exec
      (the
       (unsigned-byte 128)
       (logior
           (the (unsigned-byte 128)
                (logand (the (unsigned-byte 128) x)
                        (the (signed-byte 129)
                             -340277174624079928635746076935438991361)))
           (the (unsigned-byte 128)
                (ash (the (unsigned-byte 16) shndx)
                     112))))))

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

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

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

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

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

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

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

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

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

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

    Theorem: !elf32_sym->shndx-is-elf32_sym

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

    Theorem: elf32_sym->shndx-of-!elf32_sym->shndx

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

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

    (defthm !elf32_sym->shndx-equiv-under-mask
      (b* ((?new-x (!elf32_sym->shndx shndx x)))
        (elf32_sym-equiv-under-mask
             new-x
             x 5192296858534827628530496329220095)))