blob: 3f6248da05f40df680021b0e5b489369ea03a8e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#include "arch/memory/multiboot.hpp"
namespace teachos::arch::memory
{
auto elf_section_flags::writeable() const -> bool { return is_bit_set(0); }
auto elf_section_flags::occupies_memory() const -> bool { return is_bit_set(1); }
auto elf_section_flags::is_executable() const -> bool { return is_bit_set(2); }
auto elf_section_flags::contains_duplicate_data() const -> bool { return is_bit_set(4); }
auto elf_section_flags::contains_strings() const -> bool { return is_bit_set(5); }
auto elf_section_flags::section_header_info_is_section_header_table_index() const -> bool { return is_bit_set(6); }
auto elf_section_flags::preserve_ordering_after_combination() const -> bool { return is_bit_set(7); }
auto elf_section_flags::requires_special_os_processing() const -> bool { return is_bit_set(8); }
auto elf_section_flags::is_section_group_member() const -> bool { return is_bit_set(9); }
auto elf_section_flags::holds_thread_local_data() const -> bool { return is_bit_set(10); }
auto elf_section_flags::is_compressed() const -> bool { return is_bit_set(11); }
auto elf_section_flags::has_special_ordering_requirements() const -> bool { return is_bit_set(30); }
auto elf_section_flags::is_excluded_unless_referenced_or_allocated() const -> bool { return is_bit_set(31); }
auto elf_section_flags::operator==(elf_section_flags const & other) const -> bool { return flags == other.flags; }
auto elf_section_flags::is_bit_set(uint8_t index) const -> bool { return flags[index] == 1; }
auto elf_section_header::is_null() const -> bool
{
return name_table_index == 0U && type == elf_section_type::INACTIVE &&
flags == teachos::arch::memory::elf_section_flags{0U} && virtual_address == 0U && file_offset == 0U &&
additional_information == 0U && address_alignment == 0U && fixed_table_entry_size == 0U;
}
} // namespace teachos::arch::memory
|