[all-commits] [llvm/llvm-project] cd0ab2: [ELF] --icf: do not fold preemptible symbols

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Dec 10 09:09:34 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cd0ab2428ffedae88457c6286b2c2201e2d1cd1c
      https://github.com/llvm/llvm-project/commit/cd0ab2428ffedae88457c6286b2c2201e2d1cd1c
  Author: Fangrui Song <maskray at google.com>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M lld/ELF/Driver.cpp
    M lld/ELF/ICF.cpp
    M lld/ELF/Symbols.cpp
    M lld/ELF/Symbols.h
    M lld/ELF/Writer.cpp
    A lld/test/ELF/icf-preemptible.s

  Log Message:
  -----------
  [ELF] --icf: do not fold preemptible symbols

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

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D71163




More information about the All-commits mailing list