<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Hello,</p>
<p><br>
</p>
<p>I have a core dump that LLDB cannot open because it contains more than 64K sections. The "readelf" utility gives me the output in the end of this message. It seems that the actual number of program headers and the index of string table section are written
into very first section since they do not fit in 16 bits. </p>
<p><br>
</p>
<p>The "natural" way to deal with this problem would be to change the types of fields in ELFHeader struct from 16 to 32 bits (or should I go all the way and do it 64? in case the core dump is bigger than 4GB...) and deal with the problem in a single place
where we parse the header - the <span>ELFHeader::Parse()</span>.</p>
<p><br>
</p>
<p>Objections? Suggestions? Advices?</p>
<p><br>
</p>
<p>Hmm... I am not sure that the DataExtractor we pass down there would let me read that much past in the file - I have impression that we give only first 512 bytes there, but I might be mistaken...</p>
<p><br>
</p>
<p>Thanks,</p>
<p>Eugene</p>
<p><br>
</p>
<p></p>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">ELF Header:</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Class: ELF64</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Data: 2's complement, little endian</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Version: 1 (current)</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> OS/ABI: UNIX - System V</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> ABI Version: 0</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Type: CORE (Core file)</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Machine: Advanced Micro Devices X86-64</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Version: 0x1</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Entry point address: 0x0</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Start of program headers: 64 (bytes into file)</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Start of section headers: 16880770624 (bytes into file)</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Flags: 0x0</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Size of this header: 64 (bytes)</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Size of program headers: 56 (bytes)</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Number of program headers:
<span style="background-color: rgb(255, 255, 0);">65535 (106714)</span></span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Size of section headers: 64 (bytes)</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Number of section headers:
<span style="background-color: rgb(255, 255, 0);">0 (106716)</span></span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Section header string table index:
<span style="background-color: rgb(255, 255, 0);">65535 (106715)</span></span></div>
<div><br>
</div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;">Section Headers:</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> [Nr] Name Type Address Offset</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> Size EntSize Flags Link Info Align</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> [ 0] NULL 0000000000000000 00000000</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> 000000000001a0dc 0000000000000000 <span style="background-color: rgb(255, 255, 0);">106715</span>
<span style="background-color: rgb(255, 255, 0);">106714</span> 0</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> [ 1] note0 NOTE 0000000000000000 005b2ff0</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> 00000000000b2e38 0000000000000000 A 0 0 1</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> [ 2] load PROGBITS 000000006a400000 00665e28</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> 0000000000001000 0000000000000000 A 0 0 1</span></div>
<div><span style="font-size: 10pt; font-family: "Courier New", monospace;"> [ 3] load PROGBITS 000000006a401000 00666e28</span></div>
<div><br>
</div>
<br>
<p></p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div id="Signature">
<p>Sent from <a href="http://aka.ms/weboutlook" id="LPNoLP">Outlook</a><br>
</p>
</div>
</div>
</body>
</html>