[PATCH] D62840: [ELF] Suppress "STT_SECTION symbol should be defined" warnings on .eh_frame, .debug* and .zdebug*

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 22:08:39 PDT 2019


MaskRay created this revision.
MaskRay added reviewers: grimar, phosek, ruiu.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

With -r or --emit-relocs, we warn `STT_SECTION symbol should be defined`
on relocations to discarded section symbol. This was added as an error
in rLLD319404 <https://reviews.llvm.org/rLLD319404>, but was not so effective before D61583 <https://reviews.llvm.org/D61583> (turned to a
warning).

Relocations from .eh_frame .debug* .zdebug* to discarded .text are very
common and somewhat expected. Don't warn on them.

invalid-undef-section-symbol.test can be deleted as what it intended to
check is now covered by the updated comdat-discarded-reloc.s


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D62840

Files:
  ELF/InputSection.cpp
  test/ELF/Inputs/comdat-discarded-reloc.s
  test/ELF/comdat-discarded-reloc.s
  test/ELF/invalid-undef-section-symbol.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62840.202851.patch
Type: text/x-patch
Size: 4021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190604/61856d97/attachment-0001.bin>


More information about the llvm-commits mailing list