浏览代码

LibELF: Fix build with ELF_IMAGE_DEBUG

Andreas Kling 4 年之前
父节点
当前提交
cb2db3710b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Userland/Libraries/LibELF/Image.cpp

+ 2 - 2
Userland/Libraries/LibELF/Image.cpp

@@ -120,7 +120,7 @@ void Image::dump() const
     });
     });
 
 
     for (unsigned i = 0; i < header().e_shnum; ++i) {
     for (unsigned i = 0; i < header().e_shnum; ++i) {
-        auto& section = this->section(i);
+        const auto& section = this->section(i);
         dbgln("    Section {}: {{", i);
         dbgln("    Section {}: {{", i);
         dbgln("        name: {}", section.name());
         dbgln("        name: {}", section.name());
         dbgln("        type: {:x}", section.type());
         dbgln("        type: {:x}", section.type());
@@ -132,7 +132,7 @@ void Image::dump() const
 
 
     dbgln("Symbol count: {} (table is {})", symbol_count(), m_symbol_table_section_index);
     dbgln("Symbol count: {} (table is {})", symbol_count(), m_symbol_table_section_index);
     for (unsigned i = 1; i < symbol_count(); ++i) {
     for (unsigned i = 1; i < symbol_count(); ++i) {
-        auto& sym = symbol(i);
+        const auto& sym = symbol(i);
         dbgln("Symbol @{}:", i);
         dbgln("Symbol @{}:", i);
         dbgln("    Name: {}", sym.name());
         dbgln("    Name: {}", sym.name());
         dbgln("    In section: {}", section_index_to_string(sym.section_index()));
         dbgln("    In section: {}", section_index_to_string(sym.section_index()));