<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }p { margin-top: 0px; margin-bottom: 0px; }body { font-size: 10.5pt; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
Hi there,
<p>I am studying LLVM and RISCV , and currently I am reading the
source code. <br>
</p>
<p>Now I have a question on the Fragment and Fragment Type (I put a
code slice below), I guess that can be related to generate
assemble or elf file. But it is hard for me to map the source
code to real assembler file or elf file. <br>
</p>
<p>could you please tell me the meaning of Fragment and Fragment
type? What is the relationship between fragment and sections? How are they used to generate obj file? Thanks in advance.</p>
<p>Best Regards,<br>
</p>
<p>David. <br>
</p>
<div style="color: #d4d4d4;background-color: #1e1e1e;font-family: 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #569cd6;">public:</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #569cd6;">enum</span><span style="color: #d4d4d4;"> </span><span style="color: #4ec9b0;">FragmentType</span><span style="color: #d4d4d4;"> : </span><span style="color: #569cd6;">uint8_t</span><span style="color: #d4d4d4;"> {</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_Align</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_Data</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_CompactEncodedInst</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_Fill</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_Relaxable</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_Org</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_Dwarf</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_DwarfFrame</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_LEB</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_Padding</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_SymbolId</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_CVInlineLines</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_CVDefRange</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;"> </span><span style="color: #51b6c4;">FT_Dummy</span></div><div><span style="color: #d4d4d4;"> };</span></div></div>
</body></html>