[PATCH] D61584: [DebugInfo] Some fields do not need relocations even relax is enabled.

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 16:31:30 PDT 2019


HsiangKai added a comment.

In D61584#1504553 <https://reviews.llvm.org/D61584#1504553>, @jrtc27 wrote:

> Why do we need this flag; can we not already determine this (either in generic code or the target backends)? Anything where all symbols referenced are not in `SHF_EXECINSTR` sections can be evaluated even with relaxations, which covers all these cases:
>
> 1. `MCDwarfLineTableHeader::Emit`'s `LineStartSym`/`LineEndSym`/`ProEndSym` are in `.debug_line.dwo` which is just `SHF_EXCLUDE`
> 2. `EmitGenDwarfInfo`'s `InfoStart`/`InfoEnd` are in `.debug_info.dwo` which is just `SHF_EXCLUDE`
> 3. `FrameEmitterImpl::EmitCIE`'s `sectionStart`/`sectionEnd` are either in `.eh_frame` which is `SHF_ALLOC` (and also `SHF_WRITE` on non-x86 Solaris), or in `.debug_frame` which has no flags
> 4. `FrameEmitterImpl::EmitFDE`'s `fdeStart`/`fdeEnd`/`cieStart`/`SectionStart` should all also be in the same section as above


I got it. I missed the information in MCSymbol. Every symbol should have information about the section it is located. So, we could use something like `sym.getSection().getKind().isText()` to determine the symbol is located in text or not. You are right. I will abandon this revision. Thanks.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61584/new/

https://reviews.llvm.org/D61584





More information about the llvm-commits mailing list