]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
lib: use .balign in md5 x86-64 asm to fix macOS over-alignment
authorAndrew Tridgell <andrew@tridgell.net>
Tue, 9 Jun 2026 02:04:17 +0000 (12:04 +1000)
committerAndrew Tridgell <andrew@tridgell.net>
Tue, 9 Jun 2026 02:26:24 +0000 (12:26 +1000)
The file used ".align 16" intending 16-byte alignment (GNU/ELF semantics).
On macOS the Mach-O assembler reads ".align N" as 2^N, so it requested
64KB alignment for __TEXT,__text, producing:

  ld: warning: reducing alignment of section __TEXT,__text from 0x10000
  to 0x1000 because it exceeds segment maximum alignment

The linker clamps it back, so it was harmless, but .balign 16 means
16 bytes on every target and silences the warning.

lib/md5-asm-x86_64.S

index 3737058f8d601ee185b0a011cd51983a3d6136cb..b8780c44c937d8409228e12bc40757191c6cbff3 100644 (file)
@@ -34,7 +34,9 @@
 #endif
 
 .text
-.align 16
+/* .balign = N bytes everywhere; bare .align means 2^N on Mach-O (would ask
+ * for 64KB alignment and trip a macOS linker warning). */
+.balign 16
 
 .globl md5_process_asm
 md5_process_asm: