diff --git a/lib/compiler_rt/elf/tls.zig b/lib/compiler_rt/elf/tls.zig index fd1bdb381d7eca0a038c967bdb48c0fff10cbec5..dccd2018ce02a2b32050b239a30f9d30dc9d06bd 100644 --- a/lib/compiler_rt/elf/tls.zig +++ b/lib/compiler_rt/elf/tls.zig @@ -499,7 +499,7 @@ fn computeAreaDesc(phdrs: []elf.ElfN.Phdr) void { var block_size: usize = undefined; if (tls_phdr) |phdr| { - align_factor = phdr.@"align"; + align_factor = @max(phdr.@"align", 1); // The effective size in memory is represented by `memsz`; the length of the data stored // in the `PT.TLS` segment is `filesz` and may be less than the former.