authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-08-08 19:40:30+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-08-09 16:56:25+02:00
log962b4bbebf484487d6ff71a957fcc3d0afda470b
tree957af09e75eeca96b1dbe5c3b93a08917b0f07b8
parentee1983a985c013905f23a95adbac77cbd6e578f2
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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).

1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/pie.zig+2-2
......@@ -264,9 +264,9 @@ inline fn getDynamicSymbol() [*]const elf.Dyn {
264264 \\ add r0, %[ret]
265265 \\ bra 2f
266266 \\ nop
267 \\1:
268267 \\ .balign 4
269 \\ .long DYNAMIC - .
268 \\1:
269 \\ .long _DYNAMIC - .
270270 \\2:
271271 : [ret] "=r" (-> [*]const elf.Dyn),
272272 :