Skip to content

Commit

Permalink
set null for unused section's section header
Browse files Browse the repository at this point in the history
  • Loading branch information
katsyoshi committed Dec 29, 2023
1 parent 1f30ecd commit 2be5249
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/vaporware/compiler/assembler/elf/section_header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ def set!(name: nil, type: nil, flags: nil, addr: nil,
def null! = set!(name: 0, type: 0, flags: 0, addr: 0, offset: 0, size: 0, link: 0, info: 0, addralign: 0, entsize: 0)
def text! = set!(flags: 0x06, addralign: 0x01)
def note! = set!(type: 0x07, flags: 0x02, size: 0x30, addralign: 0x08)
def data! = set!()
def data! = null!
def symtab! = set!
def strtab! = set!
def bss! = set!
def bss! = null!
def shstrtab! = set!

private def bytes = [@name, @type, @flags, @addr, @offset, @size, @link, @info, @addralign, @entsize]
Expand Down

0 comments on commit 2be5249

Please sign in to comment.