mirror of
https://github.com/Gericom/GCDTool.git
synced 2025-06-18 14:45:36 -04:00
14 lines
412 B
C#
14 lines
412 B
C#
namespace GCDTool.Elf.Sections;
|
|
|
|
sealed class ElfSectionFactory
|
|
{
|
|
public ElfSection CreateElfSection(SectionHeaderTableEntry section, string name)
|
|
{
|
|
return section.SectionType switch
|
|
{
|
|
ElfSectionType.Strtab => new ElfStrtab(section, name),
|
|
ElfSectionType.Symtab => new ElfSymtab(section, name),
|
|
_ => new ElfSection(section, name),
|
|
};
|
|
}
|
|
} |