[all-commits] [llvm/llvm-project] 3b337b: [ELF] Attempt to set the OS when using 'makeTriple...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Jan 5 08:24:44 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b337bbc811002d088d3ae6fcae869a8d5682bc1
      https://github.com/llvm/llvm-project/commit/3b337bbc811002d088d3ae6fcae869a8d5682bc1
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/ELF.h
    M llvm/include/llvm/Object/ELFObjectFile.h
    M llvm/include/llvm/Object/ObjectFile.h
    M llvm/lib/Object/ObjectFile.cpp
    M llvm/tools/llvm-readobj/ELFDumper.cpp
    M llvm/unittests/Object/ELFObjectFileTest.cpp

  Log Message:
  -----------
  [ELF] Attempt to set the OS when using 'makeTriple()' (#76992)

Summary:
This patch fixes up the `makeTriple()` interface to emit append the
operating system information when it is readily avaialble from the ELF.
The main motivation for this is so the GPU architectures can be easily
identified correctly when given and ELF. E.g. we want
`amdgpu-amd-amdhsa` as the output and not `amdgpu--`.

This required adding support for the CUDA OS/ABI, which is easily found
to be `0x33` when using `readelf`.




More information about the All-commits mailing list