[PATCH] D37517: [ELF] - Report orphan sections if -verbose given.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 01:51:56 PDT 2017


grimar added a comment.

In https://reviews.llvm.org/D37517#863788, @ruiu wrote:

> I'm OK if you remove `isa<SyntheticSection>` check. This is a FYI message and is not guaranteed to correct in either way. Instead of suppressing it for all synthetic sections, I'd just print it out for all synthetic sections.


Output would be next then:

  orphan input section '.text' assigned to output section '.text'
  orphan input section '.text.2' assigned to output section '.text'
  orphan input section '.comment' assigned to output section '.comment'
  orphan input section '.bss' assigned to output section '.bss'
  orphan input section '.bss.rel.ro' assigned to output section '.bss.rel.ro'
  orphan input section '.dynsym' assigned to output section '.dynsym'
  orphan input section '.gnu.version' assigned to output section '.gnu.version'
  orphan input section '.gnu.version_r' assigned to output section '.gnu.version_r'
  orphan input section '.hash' assigned to output section '.hash'
  orphan input section '.dynamic' assigned to output section '.dynamic'
  orphan input section '.dynstr' assigned to output section '.dynstr'
  orphan input section '.rela.dyn' assigned to output section '.rela.dyn'
  orphan input section '.got' assigned to output section '.got'
  orphan input section '.got.plt' assigned to output section '.got.plt'
  orphan input section '.got.plt' assigned to output section '.got.plt'
  orphan input section '.rela.plt' assigned to output section '.rela.plt'
  orphan input section '.rela.plt' assigned to output section '.rela.plt'
  orphan input section '.plt' assigned to output section '.plt'
  orphan input section '.plt' assigned to output section '.plt'
  orphan input section '.eh_frame' assigned to output section '.eh_frame'
  orphan input section '.symtab' assigned to output section '.symtab'
  orphan input section '.shstrtab' assigned to output section '.shstrtab'
  orphan input section '.strtab' assigned to output section '.strtab'
  
  Sections:
  Idx Name          Size      Address          Type
    0               00000000 0000000000000000
    1 .text         00000005 0000000000000000 TEXT DATA
    2 .dynsym       00000018 0000000000000008
    3 .hash         00000010 0000000000000020
    4 .dynstr       00000001 0000000000000030
    5 .dynamic      00000060 0000000000000038
    6 .comment      00000008 0000000000000000
    7 .symtab       00000030 0000000000000000
    8 .shstrtab     00000049 0000000000000000
    9 .strtab       0000000a 0000000000000000

Would it be better to change "orphan input section" to "orphan internal section" for synthetics ?
So mark them with something to differentiate from regular inputs for possible output proccessing.


https://reviews.llvm.org/D37517





More information about the llvm-commits mailing list