mirror of https://github.com/stella-emu/stella.git
Include info in section.
This commit is contained in:
parent
9cc43a80e5
commit
5fd00ec763
|
@ -85,8 +85,10 @@ CartridgeELF::CartridgeELF(const ByteBuffer& image, size_t size, string_view md5
|
|||
cout << "ELF sections:" << std::endl << std::endl;
|
||||
|
||||
size_t i = 0;
|
||||
for (auto& section: elfParser.getSections())
|
||||
if (section.type != 0x00) cout << (i++) << " " << section << std::endl;
|
||||
for (auto& section: elfParser.getSections()) {
|
||||
if (section.type != 0x00) cout << i << " " << section << std::endl;
|
||||
i++;
|
||||
}
|
||||
|
||||
auto symbols = elfParser.getSymbols();
|
||||
cout << std::endl << "ELF symbols:" << std::endl << std::endl;
|
||||
|
|
|
@ -119,6 +119,7 @@ ElfParser::Section ElfParser::readSection(uInt32 offset) const {
|
|||
section.virtualAddress = read32(offset + 0x0c);
|
||||
section.offset = read32(offset + 0x10);
|
||||
section.size = read32(offset + 0x14);
|
||||
section.info = read32(offset + 0x1c);
|
||||
section.align = read32(offset + 0x20);
|
||||
|
||||
if (section.offset + section.size >= size)
|
||||
|
@ -207,6 +208,7 @@ ostream& operator<<(ostream& os, const ElfParser::Section& section)
|
|||
|
||||
os
|
||||
<< " size=" << section.size
|
||||
<< " info=" << section.info
|
||||
<< " align=" << section.align;
|
||||
|
||||
return os;
|
||||
|
|
|
@ -61,6 +61,7 @@ class ElfParser {
|
|||
uInt32 offset;
|
||||
uInt32 size;
|
||||
|
||||
uInt32 info;
|
||||
uInt32 align;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue