diff --git a/src/stub/fold_elf86.asm b/src/stub/fold_elf86.asm index 44a01c03..89593b6c 100644 --- a/src/stub/fold_elf86.asm +++ b/src/stub/fold_elf86.asm @@ -181,11 +181,14 @@ L20: ; move envp L30: ; process auxv lodsd ; a_type stosd - test eax, eax ; AT_NULL ? [flags: Zero, Sign, Parity; C=0, V=0] + cmp al, 32 + jae L32 ; prevent aliasing of 'btr' when 32<=a_type btr edx, eax ; no longer need a slot of type eax [Carry only] +L32: + test eax, eax ; AT_NULL ? [flags: Zero, Sign, Parity; C=0, V=0] lodsd stosd - jne L30 ; checks only Zero bit of flags + jnz L30 ; checks only Zero bit of flags sub edi, byte 8 ; backup to AT_NULL add ecx, ecx ; two words per auxv