mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibELF: Remove sketchy use of "undefined" ELF::Image::Section
We were using ELF::Image::section(0) to indicate the "undefined" section, when what we really wanted was just Optional<Section>. So let's use Optional instead. :^)
This commit is contained in:
parent
f70d0f03de
commit
16221305ad
6 changed files with 18 additions and 19 deletions
|
@ -24,9 +24,9 @@ DwarfInfo::DwarfInfo(const ELF::Image& elf)
|
|||
ReadonlyBytes DwarfInfo::section_data(const String& section_name) const
|
||||
{
|
||||
auto section = m_elf.lookup_section(section_name);
|
||||
if (section.is_undefined())
|
||||
if (!section.has_value())
|
||||
return {};
|
||||
return section.bytes();
|
||||
return section->bytes();
|
||||
}
|
||||
|
||||
void DwarfInfo::populate_compilation_units()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue