Bootloader: installer now uses banan os elf headers intead of Linux's
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <LibELF/Types.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
@@ -7,15 +9,13 @@
|
||||
#include <string>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <elf.h>
|
||||
|
||||
class ELFFile
|
||||
{
|
||||
public:
|
||||
ELFFile(std::string_view path);
|
||||
~ELFFile();
|
||||
|
||||
const Elf64_Ehdr& elf_header() const;
|
||||
const LibELF::ElfNativeFileHeader& elf_header() const;
|
||||
std::optional<std::span<const uint8_t>> find_section(std::string_view name) const;
|
||||
|
||||
bool success() const { return m_success; }
|
||||
@@ -23,8 +23,8 @@ public:
|
||||
std::string_view path() const { return m_path; }
|
||||
|
||||
private:
|
||||
const Elf64_Shdr& section_header(std::size_t index) const;
|
||||
std::string_view section_name(const Elf64_Shdr&) const;
|
||||
const LibELF::ElfNativeSectionHeader& section_header(std::size_t index) const;
|
||||
std::string_view section_name(const LibELF::ElfNativeSectionHeader&) const;
|
||||
bool validate_elf_header() const;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user