<div dir="ltr">Hi Stephan, r364391 should properly fix the issue. (A nasty .gdb_index bug that took me many hours to figure it out...)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 25, 2019 at 11:46 PM Hans Wennborg <<a href="mailto:hans@chromium.org">hans@chromium.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I've reverted in r364321, hopefully without breaking anything else.<br>
<br>
On Tue, Jun 25, 2019 at 4:27 PM Fāng-ruì Sòng <<a href="mailto:maskray@google.com" target="_blank">maskray@google.com</a>> wrote:<br>
><br>
> Stephan, sorry, I missed your email. As Hans said, <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=978067" rel="noreferrer" target="_blank">https://bugs.chromium.org/p/chromium/issues/detail?id=978067</a> may be related. We are investigating the issue.<br>
><br>
> The revert may be a bit tricky.. I need to figure out why r362739 was a failed revert then..<br>
><br>
> On Tue, Jun 25, 2019 at 9:25 PM Hans Wennborg <<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>> wrote:<br>
>><br>
>> We're seeing debug info problems in Chromium/V8 too after this:<br>
>> <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=978067" rel="noreferrer" target="_blank">https://bugs.chromium.org/p/chromium/issues/detail?id=978067</a><br>
>><br>
>> On Fri, Jun 7, 2019 at 9:18 AM Stephan Bergmann via llvm-commits<br>
>> <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
>> ><br>
>> > With bisecting, I found that the below commit breaks the debuginfo in my<br>
>> > Linux LibreOffice builds that use lld with --gdb-index.  I wasn't able<br>
>> > to reduce the test case in any meaningful way, but what I observe is<br>
>> > that a gdb backtrace will print source information for some of the<br>
>> > frames, but for others will only print the .so pathname.  I could not<br>
>> > reproduce with a small test executable, but the shared libraries<br>
>> > involved in LibreOffice can be rather large, so maybe the issue is<br>
>> > related to size.  The backtraces look fine when I rebuild LibreOffice<br>
>> > without using --gdb-index (though I appear to have some issue with<br>
>> > "step" commands in gdb not stepping into function calls even then, but<br>
>> > didn't investigate that further).<br>
>> ><br>
>> > (I see that this commit has yesterday been reverted in r362739 and then<br>
>> > re-reverted in r362743, so I assume the situation on trunk hasn't<br>
>> > effectively changed from what I observed with my build from earlier this<br>
>> > week.)<br>
>> ><br>
>> > On 28/05/2019 16:34, Fangrui Song via llvm-commits wrote:<br>
>> > > Author: maskray<br>
>> > > Date: Tue May 28 07:34:28 2019<br>
>> > > New Revision: 361830<br>
>> > ><br>
>> > > URL: <a href="http://llvm.org/viewvc/llvm-project?rev=361830&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=361830&view=rev</a><br>
>> > > Log:<br>
>> > > Reland D61583 [ELF] Error on relocations to STT_SECTION symbols if the sections were discarded<br>
>> > ><br>
>> > > This is implemented by creating Undefined (instead of Defined) for such<br>
>> > > local STT_SECTION symbols. It allows us to catch errors when there are<br>
>> > > relocations to such discarded sections (e.g. in PR41693, ld.bfd and gold<br>
>> > > error but we don't). Updated comdat-discarded-error.s checks we emit<br>
>> > > friendly error message.<br>
>> > ><br>
>> > > For relocatable-eh-frame.s, ld.lld -r a.o a.o will now error<br>
>> > > "STT_SECTION symbol should be defined" because the section .eh_frame<br>
>> > > refers to is now an Undefined instead of a Defined.<br>
>> > > So I have to change `error()` to `warn()` to retain the output.<br>
>> > ><br>
>> > > rLLD361144 inadvertently enabled the error for --gdb-index<br>
>> > > (in LLDDwarfObj<ELFT>::findAux()).<br>
>> > ><br>
>> > > Relocations from .debug_info (not in comdat) to .text.* (in comdat) for<br>
>> > > DW_AT_low_pc are common. If an .text.* was discarded, rLLD361144 would error,<br>
>> > > which was unexpected. (Note, if we don't error as this patch does,<br>
>> > > InputSection::relocateNonAlloc() will resolve such relocations).<br>
>> > ><br>
>> > > Added:<br>
>> > >      lld/trunk/test/ELF/comdat-discarded-gdb-index.s<br>
>> > > Modified:<br>
>> > >      lld/trunk/ELF/DWARF.cpp<br>
>> > >      lld/trunk/ELF/InputFiles.cpp<br>
>> > >      lld/trunk/ELF/InputSection.cpp<br>
>> > >      lld/trunk/ELF/Relocations.cpp<br>
>> > >      lld/trunk/test/ELF/comdat-discarded-error.s<br>
>> > >      lld/trunk/test/ELF/comdat-discarded-reloc.s<br>
>> > >      lld/trunk/test/ELF/comdat.s<br>
>> > >      lld/trunk/test/ELF/invalid-undef-section-symbol.test<br>
>> > >      lld/trunk/test/ELF/relocatable-eh-frame.s<br>
>> > _______________________________________________<br>
>> > llvm-commits mailing list<br>
>> > <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
>> > <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
><br>
><br>
><br>
> --<br>
> 宋方睿<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">宋方睿</div></div>