From 2be5249b0782717f7f0d67915aa1eca13b5a1a8c Mon Sep 17 00:00:00 2001 From: "MATSUMOTO, Katsuyoshi" Date: Sat, 30 Dec 2023 00:14:21 +0900 Subject: [PATCH] set null for unused section's section header --- lib/vaporware/compiler/assembler/elf/section_header.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vaporware/compiler/assembler/elf/section_header.rb b/lib/vaporware/compiler/assembler/elf/section_header.rb index d0f9465..ac7b559 100644 --- a/lib/vaporware/compiler/assembler/elf/section_header.rb +++ b/lib/vaporware/compiler/assembler/elf/section_header.rb @@ -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]