[all-commits] [llvm/llvm-project] 7de217: [ELF] --fortran-common: prefer STB_WEAK to COMMON

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Jul 14 10:18:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7de2173c2a4c45711831cfee3ccf53690c76ff07
      https://github.com/llvm/llvm-project/commit/7de2173c2a4c45711831cfee3ccf53690c76ff07
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-07-14 (Wed, 14 Jul 2021)

  Changed paths:
    M lld/ELF/InputFiles.cpp
    M lld/test/ELF/common-archive-lookup.s

  Log Message:
  -----------
  [ELF] --fortran-common: prefer STB_WEAK to COMMON

The ELF specification says "The link editor honors the common definition and
ignores the weak ones." GNU ld and our Symbol::compare follow this, but the
--fortran-common code (D86142) made a mistake on the precedence.

Fixes https://bugs.llvm.org/show_bug.cgi?id=51082

Reviewed By: peter.smith, sfertile

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




More information about the All-commits mailing list