[all-commits] [llvm/llvm-project] 6bdad8: [MC] Fix llvm_unreachable when a STB_GNU_UNIQUE sy...

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Mar 28 13:41:01 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6bdad85b26fbfd064772f2b382b27fbbf0b0afce
      https://github.com/llvm/llvm-project/commit/6bdad85b26fbfd064772f2b382b27fbbf0b0afce
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-03-28 (Mon, 28 Mar 2022)

  Changed paths:
    M llvm/lib/MC/ELFObjectWriter.cpp
    M llvm/test/MC/ELF/gnu-unique.s

  Log Message:
  -----------
  [MC] Fix llvm_unreachable when a STB_GNU_UNIQUE symbol needs a relocation

STB_GNU_UNIQUE should be treated in a way similar to STB_GLOBAL.
This fixes an "Invalid Binding" failure in an LLVM_ENABLE_ASSERTIONS=on build
for source files like glibc elf/tst-unique1mod1.c .

This bug has been benign so far because (a) Clang does not produce
%gnu_unique_object by itself (b) a non-assertion build likely picks the
STB_GLOBAL code path anyway.




More information about the All-commits mailing list