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

2024-07-03 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/97521 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

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

2024-07-03 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/97521 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

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

2024-07-03 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: > Not that the patch is especially long/complicated, but could be split into > the refactor/move of the MC function, then the new usage, if you like (usual > reasons - smaller patches are easier to root cause, functionality can be > reverted without thrashing the refactored code

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

2024-07-03 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: > [jh7370](https://github.com/jh7370) I've skimmed briefly and the changes look > reasonable - will look more in depth on a separate occasion when I have more > time. Thanks! > Not for this PR, but I wonder if there would be some benefit in a > `--decode-crel` and/or `--encode

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

2024-07-03 Thread Fangrui Song via llvm-branch-commits
@@ -1861,7 +1886,15 @@ template Error ELFBuilder::readSections(bool EnsureSymtab) { const typename ELFFile::Elf_Shdr *Shdr = Sections->begin() + RelSec->Index; - if (RelSec->Type == SHT_REL) { + if (RelSec->Type == SHT_CREL) { +auto Rels = E

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

2024-07-03 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,60 @@ +//===- 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: Apa

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

2024-07-03 Thread Peter Smith via llvm-branch-commits
@@ -1861,7 +1886,15 @@ template Error ELFBuilder::readSections(bool EnsureSymtab) { const typename ELFFile::Elf_Shdr *Shdr = Sections->begin() + RelSec->Index; - if (RelSec->Type == SHT_REL) { + if (RelSec->Type == SHT_CREL) { +auto Rels = E

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

2024-07-03 Thread Peter Smith via llvm-branch-commits
https://github.com/smithp35 edited https://github.com/llvm/llvm-project/pull/97521 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

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

2024-07-03 Thread Peter Smith via llvm-branch-commits
https://github.com/smithp35 commented: Only a couple of small comments from me. I'll be out of the office till Monday next week, I'm fine for others to progress this wihout me. https://github.com/llvm/llvm-project/pull/97521 ___ llvm-branch-commits ma

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

2024-07-03 Thread Peter Smith via llvm-branch-commits
@@ -0,0 +1,60 @@ +//===- 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: Apa

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

2024-07-03 Thread David Blaikie via llvm-branch-commits
https://github.com/dwblaikie commented: Not that the patch is especially long/complicated, but could be split into the refactor/move of the MC function, then the new usage, if you like (usual reasons - smaller patches are easier to root cause, functionality can be reverted without thrashing th

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

2024-07-03 Thread James Henderson via llvm-branch-commits
https://github.com/jh7370 commented: I've skimmed briefly and the changes look reasonable - will look more in depth on a separate occasion when I have more time. Not for this PR, but I wonder if there would be some benefit in a `--decode-crel` and/or `--encode-crel` option that would convert a

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

2024-07-02 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-binary-utilities @llvm/pr-subscribers-mc Author: Fangrui Song (MaskRay) Changes llvm-objcopy may modify the symbol table and need to rewrite relocations. For CREL, while we can reuse the decoder from #91280, we need an encoder to support CREL. Sinc

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

2024-07-02 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/97521 llvm-objcopy may modify the symbol table and need to rewrite relocations. For CREL, while we can reuse the decoder from #91280, we need an encoder to support CREL. Since MC/ELFObjectWriter.cpp has an existing enc