<div dir="ltr"><div><div><div>Hi Jameson,<br><br></div>excuse my being silent so long.
I've checked again and everything is OK in 4.0 and in the latest trunk. My
working version is 3.9 but I was sure that I had checked with 4.0 as
well.<br></div>Btw, I found a workaround for 3.9. If -generate-type-units is set to llc the correct relocations are generated.<br><br></div>Thanks for your support.</div><div class="gmail_extra"><br><div class="gmail_quote">2017-04-11 23:39 GMT+03:00 Jameson Nash <span dir="ltr"><<a href="mailto:vtjnash@gmail.com" target="_blank">vtjnash@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">What version of LLVM are you using? This looks similar to a bug that I fixed in 4.0 (R290809). I mostly only tested for `-dwarf-version 4`, so you may get better results with using the newer format as well. But if it's broken on the latest version of LLVM, can you post a gist/pastebin of the LL file (e.g. `clang -S -emit-llvm`)? That'll help with reproducing it and seeing which entry is still getting relocated incorrectly in dwarf version 2.<div><br><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Tue, Apr 4, 2017 at 11:25 AM Aliaksei Zasenka via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr" class="m_9033945427016602994gmail_msg"><div class="m_9033945427016602994gmail_msg">Hi all,<br class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg">Need your help.<br class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg">I added some debug information to my code according to Kaleidoscope-9 sample and got stuck with a GDB error:<br class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg"><blockquote class="gmail_quote m_9033945427016602994gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">(gdb) info functions<br class="m_9033945427016602994gmail_msg">invalid dwarf2 offset 1849950870<br class="m_9033945427016602994gmail_msg"></blockquote><div class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg"></div><div class="m_9033945427016602994gmail_msg">My module is a DLL built with llc+ld toolchain. Target triple: 'i686-w64-mingw32'.<br class="m_9033945427016602994gmail_msg">Looking this offset (1849950870 == 0x6e440296) in dwarfdump output of the dll gave the following:<br class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg">0x00000296: DW_TAG_base_type [10] <br class="m_9033945427016602994gmail_msg"> DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000068f] = "void")<br class="m_9033945427016602994gmail_msg"> DW_AT_encoding [DW_FORM_data1] (0x00)<br class="m_9033945427016602994gmail_msg"> DW_AT_byte_size [DW_FORM_data1] (0x00)<br class="m_9033945427016602994gmail_msg">....<br class="m_9033945427016602994gmail_msg">0x00000cf8: DW_TAG_subprogram [16] *<br class="m_9033945427016602994gmail_msg"> DW_AT_low_pc [DW_FORM_addr] (0x000000006e384c30)<br class="m_9033945427016602994gmail_msg"> DW_AT_high_pc [DW_FORM_data4] (0x000002b4)<br class="m_9033945427016602994gmail_msg"> DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 54 )<br class="m_9033945427016602994gmail_msg"> DW_AT_name [DW_FORM_strp] ( .debug_str[0x00001616] = "FB_FPUMP@HORIZONTAL")<br class="m_9033945427016602994gmail_msg"> DW_AT_type [DW_FORM_ref_addr] (<span style="color:rgb(204,0,0)" class="m_9033945427016602994gmail_msg"><span style="background-color:rgb(255,255,255)" class="m_9033945427016602994gmail_msg"><b class="m_9033945427016602994gmail_msg">0x000000006e440296</b></span></span>)<br class="m_9033945427016602994gmail_msg"> DW_<br class="m_9033945427016602994gmail_msg">AT_external [DW_FORM_flag_present] (true)<br class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg"></div><div class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg"></div><div class="m_9033945427016602994gmail_msg">In the original object file the corresponding record was:<br class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg">0x00000296: DW_TAG_base_type [10] <br class="m_9033945427016602994gmail_msg"> DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000068f] = "void")<br class="m_9033945427016602994gmail_msg"> DW_AT_encoding [DW_FORM_data1] (0x00)<br class="m_9033945427016602994gmail_msg"> DW_AT_byte_size [DW_FORM_data1] (0x00)<br class="m_9033945427016602994gmail_msg">....<br class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg">0x00000cf8: DW_TAG_subprogram [16] *<br class="m_9033945427016602994gmail_msg"> DW_AT_low_pc [DW_FORM_addr] (0x00000000000037e0)<br class="m_9033945427016602994gmail_msg"> DW_AT_high_pc [DW_FORM_data4] (0x000002b4)<br class="m_9033945427016602994gmail_msg"> DW_AT_frame_base [DW_FORM_exprloc] (<0x1> 54 )<br class="m_9033945427016602994gmail_msg"> DW_AT_name [DW_FORM_strp] ( .debug_str[0x00001616] = "FB_FPUMP@HORIZONTAL")<br class="m_9033945427016602994gmail_msg"> DW_AT_type [DW_FORM_ref_addr] (<span style="color:rgb(204,0,0)" class="m_9033945427016602994gmail_msg"><b class="m_9033945427016602994gmail_msg">0x0000000000000296</b></span>)<br class="m_9033945427016602994gmail_msg"> DW_AT_external [DW_FORM_flag_present] (true)<br class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg"></div><div class="m_9033945427016602994gmail_msg">There are lots of subprogram records like this.<br class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg"></div><div class="m_9033945427016602994gmail_msg">Any ideas what may be done to fix that?<br class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg">My debugger config:<br class="m_9033945427016602994gmail_msg"><div class="m_9033945427016602994gmail_msg">GNU gdb (GDB) 7.10.1<br class="m_9033945427016602994gmail_msg">This GDB was configured as "i686-w64-mingw32".<br class="m_9033945427016602994gmail_msg"></div>OS : Win7 64-bit<br class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg">--<br class="m_9033945427016602994gmail_msg"></div><div class="m_9033945427016602994gmail_msg">Best regards,<br class="m_9033945427016602994gmail_msg"></div><div class="m_9033945427016602994gmail_msg">Alexey Zasenko<br class="m_9033945427016602994gmail_msg"></div><div class="m_9033945427016602994gmail_msg"><br class="m_9033945427016602994gmail_msg"></div></div></div></div></div>
______________________________<wbr>_________________<br class="m_9033945427016602994gmail_msg">
LLVM Developers mailing list<br class="m_9033945427016602994gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="m_9033945427016602994gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="m_9033945427016602994gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="m_9033945427016602994gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br class="m_9033945427016602994gmail_msg">
</blockquote></div></div></div>
</blockquote></div><br></div>