From 962b4bbebf484487d6ff71a957fcc3d0afda470b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sat, 8 Aug 2026 19:40:30 +0200 Subject: [PATCH] std.pie: fix potentially reading garbage in sh assembly The alignment should of course be applied to the label, not the contents after it. Also fix a silly typo (DYNAMIC -> _DYNAMIC). --- lib/std/pie.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/pie.zig b/lib/std/pie.zig index 84f8d35e8c082063fba23846978bb6f6c6d12eaf..a5c63e0580dbd66b3f4b17e2ac108b0c8aea8e6b 100644 --- a/lib/std/pie.zig +++ b/lib/std/pie.zig @@ -264,9 +264,9 @@ inline fn getDynamicSymbol() [*]const elf.Dyn { \\ add r0, %[ret] \\ bra 2f \\ nop - \\1: \\ .balign 4 - \\ .long DYNAMIC - . + \\1: + \\ .long _DYNAMIC - . \\2: : [ret] "=r" (-> [*]const elf.Dyn), : -- 2.54.0