[PATCH] D71163: [ELF] --icf: do not fold preemptible symbols

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 7 00:58:32 PST 2019


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

Fixes PR44124.

A preemptible symbol may refer to a different definition at runtime.
When comparing a pair of relocations, if they refer to different
symbols, and either symbol is preemptible, the two containing sections
should be considered different.

gold has a similar rule https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=ce97fa81e0c46d216b80b143ad8c02fff6906fef


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71163

Files:
  lld/ELF/Driver.cpp
  lld/ELF/ICF.cpp
  lld/ELF/Symbols.cpp
  lld/ELF/Symbols.h
  lld/ELF/Writer.cpp
  lld/test/ELF/icf-preemptible.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71163.232691.patch
Type: text/x-patch
Size: 5758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191207/0da79b64/attachment.bin>


More information about the llvm-commits mailing list