| ... | @@ -499,7 +499,7 @@ fn computeAreaDesc(phdrs: []elf.ElfN.Phdr) void { | ... | @@ -499,7 +499,7 @@ fn computeAreaDesc(phdrs: []elf.ElfN.Phdr) void { |
| 499 | var block_size: usize = undefined; | 499 | var block_size: usize = undefined; |
| 500 | | 500 | |
| 501 | if (tls_phdr) |phdr| { | 501 | if (tls_phdr) |phdr| { |
| 502 | align_factor = phdr.@"align"; | 502 | align_factor = @max(phdr.@"align", 1); |
| 503 | | 503 | |
| 504 | // The effective size in memory is represented by `memsz`; the length of the data stored | 504 | // The effective size in memory is represented by `memsz`; the length of the data stored |
| 505 | // in the `PT.TLS` segment is `filesz` and may be less than the former. | 505 | // in the `PT.TLS` segment is `filesz` and may be less than the former. |