8 Commits

Author SHA1 Message Date
Nick Sarnie
56b6624253
[BinaryFormat][ELF] Rename machine type INTEL205 to INTELGT (#159791)
`EM_INTEL205` was renamed to `EM_INTELGT` (ref
[here](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=7b9f985957798ba4dacc454f22c9e426c6897cb8))
and is used for Intel GPU images.

We will be using this type for offloading to Intel GPUs.

---------

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
2025-09-22 14:34:17 +00:00
Roland McGrath
25f4f0a56d
[llvm-ifs] Handle more e_machine values for --target (#128559)
This adds ELF::convertTripleArchTypeToEMachine and uses it in
llvm-ifs.  It handles many more Triple::ArchType values than the
old code, though not all since I couldn't quickly discern
what all the mappings are.
2025-03-26 13:21:51 -07:00
Fangrui Song
a5cc95147e
[BinaryFormat] Adjust OSABI functions and add unittests
Adjust #89280:

* ELFOSABI_LINUX is a historical alias that should not be used in new
  code. readelf -h displays "UNIX - GNU" instead of "Linux".
* "OS" is inappropriate. Some values are architecture-specific, e.g.
  ELFOSABI_ARM.
* Drop lowercase, which seems a job of the caller.

Add some unittests.

Pull Request: https://github.com/llvm/llvm-project/pull/90270
2024-04-29 13:11:58 -07:00
Fred Grim
23d88a825b
adds conversion functions for EI_OSABI in elf (#89280)
These are needed to populate elf headers in core files. This is part of
implementing process save-core in lldb
2024-04-18 15:52:05 -07:00
Kazu Hirata
0d55ea25a6 [llvm] Stop including llvm/ADT/DenseMapInfo.h (NFC)
Identified with clangd.
2023-11-11 00:13:29 -08:00
WANG Xuerui
cc07185a68 [BinaryFormat] Add LoongArch
Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D138018
2022-11-17 12:00:48 +08:00
serge-sans-paille
b58174d624 Cleanup headers for BinaryFormat
A few header removal, some forward declarations. As usual, this can
break your build due to false dependencies, the most notable change are:

- "llvm/BinaryFormat/AMDGPUMetadataVerifier.h" no longer includes "llvm/BinaryFormat/MsgPackDocument.h"

The impact on generated preprocessed lines for LLVMBinaryFormat is
pretty nice:

$ clang++ -E  -Iinclude -I../llvm/include ../llvm/lib/BinaryFormat/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l
before this patch: 705281
after this patch: 751456

Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup
2022-01-26 13:44:32 +01:00
Haowei Wu
8b4acb067f [elfabi] Prepare elfabi/ifs merging.
This change implements unified text stub format and command line
interface proposed in the elfabi/ifs merge plan.

Differential Revision: https://reviews.llvm.org/D99399
2021-07-19 11:22:43 -07:00