• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
      • Axe
      • Execloader
        • Elf-reader
          • Elf64_sym
          • Elf32_sym
          • Elf-header
          • Elf-section-header
            • Elf-section-header-fix
            • Make-elf-section-header
              • Elf-section-header-equiv
              • Elf-section-header-p
              • Change-elf-section-header
              • Elf-section-header->name-str
              • Elf-section-header->addralign
              • Elf-section-header->offset
              • Elf-section-header->flags
              • Elf-section-header->entsize
              • Elf-section-header->type
              • Elf-section-header->size
              • Elf-section-header->name
              • Elf-section-header->link
              • Elf-section-header->info
              • Elf-section-header->addr
            • 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-section-header

    Make-elf-section-header

    Basic constructor macro for elf-section-header structures.

    Syntax
    (make-elf-section-header [:name-str <name-str>] 
                             [:name <name>] 
                             [:type <type>] 
                             [:flags <flags>] 
                             [:addr <addr>] 
                             [:offset <offset>] 
                             [:size <size>] 
                             [:link <link>] 
                             [:info <info>] 
                             [:addralign <addralign>] 
                             [:entsize <entsize>]) 
    

    This is the usual way to construct elf-section-header structures. It simply conses together a structure with the specified fields.

    This macro generates a new elf-section-header structure from scratch. See also change-elf-section-header, which can "change" an existing structure, instead.

    Definition

    This is an ordinary make- macro introduced by defprod.

    Macro: make-elf-section-header

    (defmacro make-elf-section-header (&rest args)
      (std::make-aggregate 'elf-section-header
                           args
                           '((:name-str . "")
                             (:name . 0)
                             (:type . 0)
                             (:flags . 0)
                             (:addr . 0)
                             (:offset . 0)
                             (:size . 0)
                             (:link . 0)
                             (:info . 0)
                             (:addralign . 0)
                             (:entsize . 0))
                           'make-elf-section-header
                           nil))

    Function: elf-section-header

    (defun elf-section-header
           (name-str name type flags addr
                     offset size link info addralign entsize)
      (declare (xargs :guard (and (stringp name-str)
                                  (natp name)
                                  (natp type)
                                  (natp flags)
                                  (natp addr)
                                  (natp offset)
                                  (natp size)
                                  (natp link)
                                  (natp info)
                                  (natp addralign)
                                  (natp entsize))))
      (declare (xargs :guard t))
      (let ((__function__ 'elf-section-header))
        (declare (ignorable __function__))
        (b* ((name-str (mbe :logic (acl2::str-fix name-str)
                            :exec name-str))
             (name (mbe :logic (nfix name) :exec name))
             (type (mbe :logic (nfix type) :exec type))
             (flags (mbe :logic (nfix flags) :exec flags))
             (addr (mbe :logic (nfix addr) :exec addr))
             (offset (mbe :logic (nfix offset) :exec offset))
             (size (mbe :logic (nfix size) :exec size))
             (link (mbe :logic (nfix link) :exec link))
             (info (mbe :logic (nfix info) :exec info))
             (addralign (mbe :logic (nfix addralign)
                             :exec addralign))
             (entsize (mbe :logic (nfix entsize)
                           :exec entsize)))
          (list (cons 'name-str name-str)
                (cons 'name name)
                (cons 'type type)
                (cons 'flags flags)
                (cons 'addr addr)
                (cons 'offset offset)
                (cons 'size size)
                (cons 'link link)
                (cons 'info info)
                (cons 'addralign addralign)
                (cons 'entsize entsize)))))