[all-commits] [llvm/llvm-project] a9cefc: [ELF] Fix broken bitstream linking with lld when e...

Christian Iversen via All-commits all-commits at lists.llvm.org
Sun Oct 11 14:20:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a9cefc3deee04566735351c27194a9693742aadf
      https://github.com/llvm/llvm-project/commit/a9cefc3deee04566735351c27194a9693742aadf
  Author: Christian Iversen <ci at iversenit.dk>
  Date:   2020-10-11 (Sun, 11 Oct 2020)

  Changed paths:
    M lld/ELF/InputFiles.cpp

  Log Message:
  -----------
  [ELF] Fix broken bitstream linking with lld when e_machine > 255

In ELF/InputFiles.cpp, getBitcodeMachineKind() is limited to uint8_t return
type. This works as long as EM_xxx is < 256, which is true for common
architectures, but not for some newly assigned or unofficial EM_* values.

The corresponding ELF field (e_machine) can hold uint16_t.

Reviewed By: MaskRay

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




More information about the All-commits mailing list