[llvm-branch-commits] [llvm] [llvm-objcopy] Support CREL (PR #97521)

James Henderson via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jul 5 02:28:25 PDT 2024


================
@@ -0,0 +1,63 @@
+//===- MCELFExtras.h - Extra functions for ELF ------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_MC_MCELFEXTRAS_H
+#define LLVM_MC_MCELFEXTRAS_H
+
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/bit.h"
+#include "llvm/BinaryFormat/ELF.h"
+#include "llvm/Support/LEB128.h"
+#include "llvm/Support/raw_ostream.h"
+
+#include <cstdint>
+#include <type_traits>
+
+namespace llvm::ELF {
+// Encode relocations as CREL to OS. ToCrel is responsible for converting a
+// const &RelocsTy to a Elf_Crel
----------------
jh7370 wrote:

```suggestion
// const &RelocsTy to a Elf_Crel.
```
Nit

https://github.com/llvm/llvm-project/pull/97521


More information about the llvm-branch-commits mailing list