From 1044270502f31134c6a252dfe71ce8f586bc0d00 Mon Sep 17 00:00:00 2001 From: Andreas Krebbel Date: Sun, 17 Apr 2011 20:41:45 -0400 Subject: Skip extra zeroes when searching auxv on s390 --- sysdeps/s390/s390-32/elf/start.S | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sysdeps/s390') diff --git a/sysdeps/s390/s390-32/elf/start.S b/sysdeps/s390/s390-32/elf/start.S index 8e48abbcc3..c568f824ff 100644 --- a/sysdeps/s390/s390-32/elf/start.S +++ b/sysdeps/s390/s390-32/elf/start.S @@ -75,6 +75,18 @@ _start: ltr %r5,%r5 jne .L12 + /* Usually the auxiliary vector can be expected directly after + the environment variables. But we have to skip extra zeros + because the loader might have removed unsecure variables for + setuid programs. */ + +.L26: l %r5,0(%r6) + la %r6,4(%r6) + ltr %r5,%r5 + jz .L26 + + ahi %r6,-4 + /* Obtain the needed values from the auxiliary vector. */ lhi %r7,16 /* AT_HWCAP */ -- cgit 1.4.1