From 32b9f23135ace01e646b68c23ed33d0c80cd6751 Mon Sep 17 00:00:00 2001 From: "MATSUMOTO, Katsuyoshi" Date: Tue, 3 Oct 2023 21:06:51 +0900 Subject: [PATCH] fix name to Shstrtab --- sig/vaporware/compiler/assembler/elf/section.rbs | 2 +- sig/vaporware/compiler/assembler/elf/section/shstrtab.rbs | 8 ++++++++ sig/vaporware/compiler/assembler/elf/section/shsymtab.rbs | 8 -------- sig/vaporware/compiler/assembler/elf/sections.rbs | 4 +++- 4 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 sig/vaporware/compiler/assembler/elf/section/shstrtab.rbs delete mode 100644 sig/vaporware/compiler/assembler/elf/section/shsymtab.rbs diff --git a/sig/vaporware/compiler/assembler/elf/section.rbs b/sig/vaporware/compiler/assembler/elf/section.rbs index 6225cc0..9ef883d 100644 --- a/sig/vaporware/compiler/assembler/elf/section.rbs +++ b/sig/vaporware/compiler/assembler/elf/section.rbs @@ -1,6 +1,6 @@ class Vaporware::Compiler::Assembler::ELF::Section @header: Vaporware::Compiler::Assembler::ELF::SectionHeader - @body: Vaporware::Compiler::Assembler::ELF::Section::Text | Vaporware::Compiler::Assembler::ELF::Section | Vaporware::Compiler::Assembler::ELF::Section::Data | Vaporware::Compiler::Assembler::ELF::Section::BSS | Vaporware::Compiler::Assembler::ELF::Section::Symtab | Vaporware::Compiler::Assembler::ELF::Section::Shsymtab | Vaporware::Compiler::Assembler::ELF::Section::Strtab | Vaporware::Compiler::Assembler::ELF::Section::Note + @body: Vaporware::Compiler::Assembler::ELF::Section::Text | Vaporware::Compiler::Assembler::ELF::Section::Null | Vaporware::Compiler::Assembler::ELF::Section::Data | Vaporware::Compiler::Assembler::ELF::Section::BSS | Vaporware::Compiler::Assembler::ELF::Section::Symtab | Vaporware::Compiler::Assembler::ELF::Section::Shstrtab | Vaporware::Compiler::Assembler::ELF::Section::Strtab | Vaporware::Compiler::Assembler::ELF::Section::Note def initialize: (type: (String | Symbol)) -> void end diff --git a/sig/vaporware/compiler/assembler/elf/section/shstrtab.rbs b/sig/vaporware/compiler/assembler/elf/section/shstrtab.rbs new file mode 100644 index 0000000..def9aee --- /dev/null +++ b/sig/vaporware/compiler/assembler/elf/section/shstrtab.rbs @@ -0,0 +1,8 @@ +class Vaporware::Compiler::Assembler::ELF::Section::Shstrtab + @strtab: Array[Integer] + + def build: () -> String + def set!: (name: String | Array[Integer]) -> self + private def bytes: () -> Array[Array[Integer]?] + private def set_name: (String | Array[Integer]) -> Array[Integer]? +end diff --git a/sig/vaporware/compiler/assembler/elf/section/shsymtab.rbs b/sig/vaporware/compiler/assembler/elf/section/shsymtab.rbs deleted file mode 100644 index d2c5528..0000000 --- a/sig/vaporware/compiler/assembler/elf/section/shsymtab.rbs +++ /dev/null @@ -1,8 +0,0 @@ -class Vaporware::Compiler::Assembler::ELF::Section::Shsymtab - attr_reader size: Integer - attr_reader offset: Integer - - def build: () -> String - def set!: () -> self - private def bytes: () -> Array[Array[Integer]?] -end diff --git a/sig/vaporware/compiler/assembler/elf/sections.rbs b/sig/vaporware/compiler/assembler/elf/sections.rbs index be48277..ea72751 100644 --- a/sig/vaporware/compiler/assembler/elf/sections.rbs +++ b/sig/vaporware/compiler/assembler/elf/sections.rbs @@ -6,5 +6,7 @@ class Vaporware::Compiler::Assembler::ELF::Sections attr_reader note: Vaporware::Compiler::Assembler::ELF::Section attr_reader symtab: Vaporware::Compiler::Assembler::ELF::Section attr_reader strtab: Vaporware::Compiler::Assembler::ELF::Section - attr_reader shsymtab: Vaporware::Compiler::Assembler::ELF::Section + attr_reader shstrtab: Vaporware::Compiler::Assembler::ELF::Section + + def each: (){ (Vaporware::Compiler::Assembler::ELF::Section) -> void } -> void end