ELFImage: Sprinkle some constification love
This commit is contained in:
parent
1498a3be32
commit
7de79d3bbb
Notes:
sideshowbarker
2024-07-19 13:11:00 +09:00
Author: https://github.com/rburchell Commit: https://github.com/SerenityOS/serenity/commit/7de79d3bbbd Pull-request: https://github.com/SerenityOS/serenity/pull/337
2 changed files with 4 additions and 4 deletions
|
@ -29,7 +29,7 @@ static const char* object_file_type_to_string(Elf32_Half type)
|
|||
}
|
||||
}
|
||||
|
||||
const char* ELFImage::section_index_to_string(unsigned index)
|
||||
const char* ELFImage::section_index_to_string(unsigned index) const
|
||||
{
|
||||
if (index == SHN_UNDEF)
|
||||
return "Undefined";
|
||||
|
@ -43,7 +43,7 @@ unsigned ELFImage::symbol_count() const
|
|||
return section(m_symbol_table_section_index).entry_count();
|
||||
}
|
||||
|
||||
void ELFImage::dump()
|
||||
void ELFImage::dump() const
|
||||
{
|
||||
kprintf("ELFImage{%p} {\n", this);
|
||||
kprintf(" is_valid: %u\n", is_valid());
|
||||
|
|
|
@ -9,7 +9,7 @@ class ELFImage {
|
|||
public:
|
||||
explicit ELFImage(const u8*);
|
||||
~ELFImage();
|
||||
void dump();
|
||||
void dump() const;
|
||||
bool is_valid() const { return m_valid; }
|
||||
bool parse();
|
||||
|
||||
|
@ -132,7 +132,7 @@ private:
|
|||
const Elf32_Phdr& program_header_internal(unsigned) const;
|
||||
const char* table_string(unsigned offset) const;
|
||||
const char* section_header_table_string(unsigned offset) const;
|
||||
const char* section_index_to_string(unsigned index);
|
||||
const char* section_index_to_string(unsigned index) const;
|
||||
|
||||
const u8* m_buffer { nullptr };
|
||||
bool m_valid { false };
|
||||
|
|
Loading…
Add table
Reference in a new issue