<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div class="" tabindex="0" id="yui_3_16_0_1_1450219359820_7409" style="outline: none 0px; display: table; width: 1052px; box-sizing: border-box; padding-top: 12px; padding-left: 0px; font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"><div class="" id="yui_3_16_0_1_1450219359820_7453" style="display: table-cell; width: auto; word-wrap: break-word; word-break: break-word;"><div id="yiv2724864838" class=""><div id="yui_3_16_0_1_1450219359820_7452" class=""><div id="yui_3_16_0_1_1450219359820_7451" style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class=""><div id="yiv2724864838yui_3_16_0_1_1450219359820_5009" class=""><span id="yiv2724864838yui_3_16_0_1_1450219359820_5041" class="" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px;">I am implementing a defined, but currently unimplemented by LLVM, ABI. This ABI differs from an existing ABI in its ELF object format by implementing a subset of an existing ABI, but encoded differently and by setting the e_ident EI_CLASS field. I am trying to use MCTargetOptions::getABIName to set a boolean in the modified subclass of MCELFObjectTargetWriter to indicate which relocation encoding to use. As far as I can determine by source examination and judicious use of a debugger there isn't a simple path from the command line and the setting of ABIname in MCTargetOptions to where an instance of a subclass of MCELFObjectTargetWriter is created.</span></div><div id="yiv2724864838yui_3_16_0_1_1450219359820_5043" class="" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px;"><br id="yiv2724864838yui_3_16_0_1_1450219359820_5045" class=""></div><div id="yiv2724864838yui_3_16_0_1_1450219359820_5047" class="" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px;">I looked at the approach taken by both Mips and X86 for implementing ILP32 and neither seems applicable. For x86 x32, there is the combination of IsELF64 == false and OSABI == EM_X86_64, but that doesn't seem applicable, as the ELF e_machine field is the same for the existing and the new ABI. For Mips N32, code and state in MCELFObjectTargetWriter seems to take care of mapping the relocation values and the ELF e_flags bit EF_MIPS_ABI_ON32 is set.</div><div id="yiv2724864838yui_3_16_0_1_1450219359820_5049" class="" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px;"><br id="yiv2724864838yui_3_16_0_1_1450219359820_5051" class=""></div><div id="yiv2724864838yui_3_16_0_1_1450219359820_5053" class="" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px;">I'm trying to implement the AArch64 ILP32 ELF ABI.Ideally, I'd like to be able to create a modified version of AArch64ELFObjectWriter so that its GerRelocType method can choose which relocation encoding to use based upon what was specified on the command line. Should I make up a new OSABI enum value? Do some kind of manipulation of the Triple environment field to set it based upon the value of "-mabi="?</div><div id="yiv2724864838yui_3_16_0_1_1450219359820_5055" class="" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px;"><br id="yiv2724864838yui_3_16_0_1_1450219359820_5057" class=""></div><div id="yiv2724864838yui_3_16_0_1_1450219359820_5059" class="" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px;">ARM64 ELF  Reference with ILP32 information:</div><div id="yiv2724864838yui_3_16_0_1_1450219359820_5061" class="" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px;" dir="ltr"><a rel="nofollow" target="_blank" href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0056c/IHI0056C_beta_aaelf64.pdf" id="yiv2724864838yui_3_16_0_1_1450219359820_5063" class="" style="color: rgb(17, 85, 204);">http://infocenter.arm.com/ help/topic/com.arm.doc. ihi0056c/IHI0056C_beta_ aaelf64.pdf</a></div></div></div></div></div></div></div></body></html>