<div dir="ltr"><div class="gmail_default"><font face="tahoma, sans-serif">Hello,</font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><font face="tahoma, sans-serif">I am working on my research using LLVM. </font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><font face="tahoma, sans-serif">I need to obtain the following information at each object file during compilation, and want to store them into the new section that I define. Currently the target architecture is x86_64 with ELF format.</font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><b><font face="tahoma, sans-serif">a) actual size of basic blocks in bytes to be emitted </font><br clear="all"></b></div><div class="gmail_default"><b><font face="tahoma, sans-serif">b) number of fixups </font><span style="font-family:tahoma,sans-serif">(adjusted in <i>MCAssembler.cpp</i>)</span><span style="font-family:tahoma,sans-serif"> that belong to each basic block </span></b></div><div class="gmail_default"><br></div><div class="gmail_default">I have tried to understand the backend codes, but I was not able to get the <span style="font-family:tahoma,sans-serif">actual size of basic blocks </span>in either code generation or MC layer. By the time of emitting the actual bytes, I could only see the unit of the fragment without the boundary of functions and basic blocks. <br></div><div class="gmail_default"><br></div><div class="gmail_default">I need to know how many fixups (for reference updates) reside in each basic block as well, but I could not find any link to get basic block information in MC layer. </div><div class="gmail_default"><br></div><div class="gmail_default">Finally, if there is any guide to define new section (and its header), please let me know. Any direction to start with would be appreciated.</div><div class="gmail_default"><br></div><div class="gmail_default"><font face="tahoma, sans-serif">Thanks a lot for your help in advance!</font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div><div class="gmail_signature"><div dir="ltr"><font color="#444444" size="2" face="verdana, sans-serif">Best Regards,<br></font><div><div class="gmail_default" style="color:rgb(68,68,68);font-family:tahoma,sans-serif;display:inline"></div><span style="color:rgb(68,68,68);font-family:verdana,sans-serif">Kevin<div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;display:inline"> </div></span><font color="#444444" size="2" face="verdana, sans-serif">Koo</font></div></div></div></div>
</div>