[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

2025-05-09 Thread Fangrui Song via llvm-branch-commits
@@ -50,26 +53,26 @@ class MCSectionGOFF final : public MCSection { friend class MCContext; friend class MCSymbolGOFF; - MCSectionGOFF(StringRef Name, SectionKind K, GOFF::SDAttr SDAttributes, -MCSectionGOFF *Parent) - : MCSection(SV_GOFF, Name, K.isTe

[llvm-branch-commits] MC: Emit symbols for R_X86_64_PLT32 relocation pointing to symbols with non-zero values. (PR #138795)

2025-05-06 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: The goal is to differentiate two scenarios when a symbol is referenced by a potential R_X86_64_PLT32 relocation: * `.4byte foo@plt - .` (LLVM assembly extension, not supported in GNU assembler): No redirection to a thunk. References foo or its PLT entry. * `jmp foo; .section .te

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-05-06 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: > @MaskRay Sorry, your comment is basically empty. I guess a GitHub problem? Sorry... Could be my accidentally pushing a comment to a wrong PR.. https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm

[llvm-branch-commits] MC: Emit symbols for R_X86_64_PLT32 relocation pointing to symbols with non-zero values. (PR #138795)

2025-05-06 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: I've read https://github.com/llvm/llvm-project/pull/138366#issuecomment-2855889424 but I am still not following. What is invalid? Note that range extension thunks track both the symbol and the addend (e.g. https://reviews.llvm.org/D70637 (AArch64)). So we could add a thunk for

[llvm-branch-commits] [clang] [KeyInstr][Clang] Agg init atom (PR #134635)

2025-05-13 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,39 @@ + MaskRay wrote: Use `clang/test/CodeGen/debug-info-*.c`? We use `%clang_cc1` in almost all non-driver tests https://github.com/llvm/llvm-project/pull/134635 ___ llvm-branch-commits mailing list llvm-

[llvm-branch-commits] ELF: Add a -z glibc-228-compat flag for working around an old glibc bug. (PR #133532)

2025-05-13 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay requested changes to this pull request. While at Google, I encountered this issue co-authored the glibc commit b5c45e83753b27dc538dff2d55d4410c385cf3a4. I don’t believe this is relevant for upstream LLD, so I haven’t pursued submitting a linker patch. The piece of LLD

[llvm-branch-commits] [llvm] release/20.x: [RelLookupTableConverter] Drop unnamed_addr to avoid generating GOTPCREL relocations (#142304) (PR #142311)

2025-06-01 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/142311 ___ 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] Move relocation specifier constants to AArch64:: (PR #144633)

2025-06-17 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/144633 Rename these relocation specifier constants, aligning with the naming convention used by other targets (`S_` instead of `VK_`). * ELF/COFF: AArch64MCExpr::VK_ => AArch64::S_ (VK_ABS/VK_PAGE_ABS are also used b

[llvm-branch-commits] [llvm] [GOFF] Emit symbols for functions. (PR #144437)

2025-06-18 Thread Fangrui Song via llvm-branch-commits
@@ -41,6 +44,61 @@ void MCGOFFStreamer::changeSection(MCSection *Section, uint32_t Subsection) { MCObjectStreamer::changeSection(Section, Subsection); } +void MCGOFFStreamer::emitLabel(MCSymbol *Symbol, SMLoc Loc) { + MCObjectStreamer::emitLabel(Symbol, Loc); + cast(Symbo

[llvm-branch-commits] [llvm] [GOFF] Emit symbols for functions. (PR #144437)

2025-06-18 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/144437 ___ 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] [GOFF] Emit symbols for functions. (PR #144437)

2025-06-18 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay commented: LGTM! But I will delegated to a GOFF expert for approval... https://github.com/llvm/llvm-project/pull/144437 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[llvm-branch-commits] Move relocation specifier constants to AArch64:: (PR #144633)

2025-06-20 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/144633 ___ 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] Move relocation specifier constants to AArch64:: (PR #144633)

2025-06-20 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/144633 ___ 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] [llvm-objdump] Support --symbolize-operand on AArch64 (PR #145009)

2025-06-24 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,67 @@ +# RUN: yaml2obj %s -o %t +# RUN: llvm-objdump %t -d --symbolize-operands --no-show-raw-insn --no-leading-addr | \ +# RUN: FileCheck %s --match-full-lines -DABS_ADRP_VAL=0x6000 +# RUN: llvm-objdump %t -d --symbolize-operands --no-show-raw-insn --no-leading-add

[llvm-branch-commits] [llvm] [llvm-objdump] Support --symbolize-operand on AArch64 (PR #145009)

2025-06-24 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/145009 ___ 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-objdump] Support --symbolize-operand on AArch64 (PR #145009)

2025-06-21 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay commented: Looks good, but I'd check whether @jh7370 has opinions on the test. (We need an executable for testing. llvm/test cannot use lld, so we have to resort to hexadecimal bytes...) https://github.com/llvm/llvm-project/pull/145009

[llvm-branch-commits] [lld] ELF: Add branch-to-branch optimization. (PR #138366)

2025-06-14 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,94 @@ +//===- TargetImpl.h -*- 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] [lld] ELF: Add branch-to-branch optimization. (PR #138366)

2025-06-14 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,98 @@ +# REQUIRES: x86 + +## Test that the branch-to-branch optimization follows the links +## from f1 -> f2 -> f3 and updates all references to point to f3. + +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o +# RUN: ld.lld %t.o -o %t --branch-to-branch

[llvm-branch-commits] [lld] ELF: Add branch-to-branch optimization. (PR #138366)

2025-06-14 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,92 @@ +//===- TargetImpl.h -*- 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] [lld] ELF: Add branch-to-branch optimization. (PR #138366)

2025-06-14 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,94 @@ +//===- TargetImpl.h -*- C++ -*-===// MaskRay wrote: `//===--===//` for new file per https://llvm.org/docs/CodingStandards.html#file

[llvm-branch-commits] [lld] ELF: Add branch-to-branch optimization. (PR #138366)

2025-06-14 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: > [pcc](https://github.com/pcc) wants to merge 1 commit into > [users/pcc/spr/main.elf-add-branch-to-branch-optimization](https://github.com/llvm/llvm-project/tree/users/pcc/spr/main.elf-add-branch-to-branch-optimization) > from > [users/pcc/spr/elf-add-branch-to-branch-optimiza

[llvm-branch-commits] [lld] ELF: Add branch-to-branch optimization. (PR #138366)

2025-06-14 Thread Fangrui Song via llvm-branch-commits
@@ -975,6 +977,62 @@ void AArch64::relocateAlloc(InputSectionBase &sec, uint8_t *buf) const { } } +static std::optional getControlTransferAddend(InputSection &is, +Relocation &r) { + // Identify a control transfer rel

[llvm-branch-commits] [lld] ELF: Add branch-to-branch optimization. (PR #138366)

2025-06-14 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: Perhaps you'll need to change the base branch to `main` and force push to users/pcc/spr/elf-add-branch-to-branch-optimization? https://github.com/llvm/llvm-project/pull/138366 ___ llvm-branch-commits mailing list llvm-branch-commits@lis

[llvm-branch-commits] [lld] ELF: Add branch-to-branch optimization. (PR #138366)

2025-06-14 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,94 @@ +//===- TargetImpl.h -*- 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] 7e3e2e1 - MCParser: Add SMLoc to expressions

2025-07-06 Thread Fangrui Song via llvm-branch-commits
Author: Fangrui Song Date: 2025-07-04T00:58:07-07:00 New Revision: 7e3e2e1b8c6ff21e68782a56164139cca334fcf3 URL: https://github.com/llvm/llvm-project/commit/7e3e2e1b8c6ff21e68782a56164139cca334fcf3 DIFF: https://github.com/llvm/llvm-project/commit/7e3e2e1b8c6ff21e68782a56164139cca334fcf3.diff

[llvm-branch-commits] [llvm] ARM: Move sjlj libcall configuration to RuntimeLibcalls (PR #147227)

2025-07-06 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/147227 ___ 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] SafeStack: Emit __safestack_pointer_address call through RuntimeLibcalls (PR #147916)

2025-07-15 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/147916 ___ 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] SafeStack: Check if __safestack_pointer_address is available (PR #147917)

2025-07-15 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/147917 ___ 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] SafeStack: Emit call to __stack_chk_fail through RuntimeLibcalls (PR #147915)

2025-07-15 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/147915 ___ 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] MC: Refactor FT_Align fragments when linker relaxation is enabled (PR #149465)

2025-07-18 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/149465 Previously, two MCAsmBackend hooks were used, with shouldInsertFixupForCodeAlign calling getWriter().recordRelocation directly, bypassing generic code. This patch: * Introduces MCAsmBackend::relaxAlign to repla

[llvm-branch-commits] ELF: Add --preferred-function-alignment flag. (PR #149448)

2025-07-18 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: I haven't had the chance to review this patch in detail, but I’m concerned about the number of linker options required for the CFI feature. While I recognize its benefits, the complexity seems excessive. https://github.com/llvm/llvm-project/pull/149448 __

<    3   4   5   6   7   8