<div><b id="internal-source-marker_0.7268091451842338" style="font-family:'LiHei Pro';font-size:medium;font-weight:normal"><span style="font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Hi, </span><br>
<span style="font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"></span><br><span style="font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">This patch adds support for ELF PIC. I know that ARMFastISel hasn’t been used for ELF object files, but I think this patch will be helpful to ELF support.</span><br>
<span style="font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"></span><br><span style="font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">This patch uses the same way which X86FastISel uses for ELF PIC codegen, you can find the similar code in the “CGBR” pass which is in lib/Target/X86/X86InstrInfo.cpp .</span><br>
<span style="font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"></span><br><span style="font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">The “ARMCGBR” pass in my patch lowers the value of a ELF specific symbol “_GLOBAL_OFFSET_TABLE_” into a global base register , and this global base register is used by ARMFastISel for ELF PIC codegen.</span><br>
<span style="font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"></span><br><span style="font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Please review it ,thanks.</span><br>
<span style="font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"></span><br><span style="font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Jush</span></b></div>