[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r15005 - in /fsf/trunk/libc: ./ elf/ libio/ nptl/ nptl/sysdeps/i386/ nptl/sysdeps/x86_64/ nss/nss_files/ stdio-common/ sysde...



Author: eglibc
Date: Sun Aug 21 00:40:24 2011
New Revision: 15005

Log:
Import glibc-mainline for 2011-08-21

Added:
    fsf/trunk/libc/stdio-common/bug24.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/scandir64.c
Removed:
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/scandir64.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/elf/dl-open.c
    fsf/trunk/libc/libio/fileops.c
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/nptl/Makefile
    fsf/trunk/libc/nptl/sysdeps/i386/pthreaddef.h
    fsf/trunk/libc/nptl/sysdeps/x86_64/pthreaddef.h
    fsf/trunk/libc/nss/nss_files/files-alias.c
    fsf/trunk/libc/nss/nss_files/files-key.c
    fsf/trunk/libc/stdio-common/Makefile
    fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
    fsf/trunk/libc/sysdeps/x86_64/dl-trampoline.S
    fsf/trunk/libc/sysdeps/x86_64/dl-trampoline.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Aug 21 00:40:24 2011
@@ -1,4 +1,45 @@
-2011-08-14  David S. Miller  <davem@xxxxxxxxxxx>
+2011-08-20  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* nss/nss_files/files-alias.c (get_next_alias): Use feof_unlocked
+	and fgetc_unlocked.
+	* nss/nss_files/files-key.c (search): Use fgets_unlocked and
+	getc_unlocked.
+
+	* elf/dl-open.c (add_to_global): Report additions to the global scope
+	for LD_DEBUG=scopes.
+	(dl_open_worker): Also print scope of newly loaded dependencies.
+	(_dl_show_scope): Indicate if there is no scope.
+
+	[BZ #13114]
+	* stdio-common/Makefile (tests): Add bug24.
+	* stdio-common/bug24.c: New file.
+
+2011-08-19  Andreas Jaeger  <aj@xxxxxxx>
+
+	[BZ #13114]
+	* libio/fileops.c (_IO_new_file_fopen): Fix handling of
+	non-existant file when using close-on-exec mode.
+
+2011-08-20  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_resolve): Fix CFI for
+	the very first instruction.
+
+	* sysdeps/x86_64/dl-trampoline.h: If MORE_CODE is defined, restore
+	the CFI state in the end.
+	* sysdeps/x86_64/dl-trampoline.S: Define MORE_CODE before first
+	inclusion of dl-trampoline.h.
+	Based on a patch by Jiri Olsa <jolsa@xxxxxxxxxx>.
+
+2011-08-19  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* sysdeps/powerpc/fpu/libm-test-ulps: Relax ctan (0.75 + 1.25 i)
+	expectations for long double.
+
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/scandir64.c: Renamed
+	from sysdeps/unix/sysv/linux/powerpc/scandir64.c.
+
+2011-08-14  David S. Miller  <davem@xxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/Makefile (CFLAGS-tst-writev.c): The
 	artificual limit depends upon the system page size.

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sun Aug 21 00:40:24 2011
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2011-8-8
+GNU C Library NEWS -- history of user-visible changes.  2011-8-20
 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -9,7 +9,7 @@
 
 * The following bugs are resolved with this release:
 
-  9696, 12868, 12852, 12874, 12885, 12907, 12922, 12935, 13007, 13021
+  9696, 12868, 12852, 12874, 12885, 12907, 12922, 12935, 13007, 13021, 13114
 
 * New program pldd to list loaded object of a process
   Implemented by Ulrich Drepper.

Modified: fsf/trunk/libc/elf/dl-open.c
==============================================================================
--- fsf/trunk/libc/elf/dl-open.c (original)
+++ fsf/trunk/libc/elf/dl-open.c Sun Aug 21 00:40:24 2011
@@ -152,6 +152,11 @@
 	{
 	  map->l_global = 1;
 	  ns->_ns_main_searchlist->r_list[new_nlist++] = map;
+
+	  /* We modify the global scope.  Report this.  */
+	  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
+	    _dl_debug_printf ("\nadd %s [%lu] to global scope\n",
+			      map->l_name, map->l_ns);
 	}
     }
   atomic_write_barrier ();
@@ -345,6 +350,7 @@
   for (unsigned int i = 0; i < new->l_searchlist.r_nlist; ++i)
     {
       struct link_map *imap = new->l_searchlist.r_list[i];
+      int from_scope = 0;
 
       /* If the initializer has been called already, the object has
 	 not been loaded here and now.  */
@@ -409,9 +415,8 @@
 	  atomic_write_barrier ();
 	  imap->l_scope[cnt] = &new->l_searchlist;
 
-	  /* Print scope information.  */
-	  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
-	    _dl_show_scope (imap, cnt);
+	  /* Print only new scope information.  */
+	  from_scope = cnt;
 	}
       /* Only add TLS memory if this object is loaded now and
 	 therefore is not yet initialized.  */
@@ -431,6 +436,10 @@
 	  /* We have to bump the generation counter.  */
 	  any_tls = true;
 	}
+
+      /* Print scope information.  */
+      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
+	_dl_show_scope (imap, from_scope);
     }
 
   /* Bump the generation number if necessary.  */
@@ -652,6 +661,8 @@
 
 	_dl_debug_printf_c ("\n");
       }
+  else
+    _dl_debug_printf (" no scope\n");
   _dl_debug_printf ("\n");
 }
 

Modified: fsf/trunk/libc/libio/fileops.c
==============================================================================
--- fsf/trunk/libc/libio/fileops.c (original)
+++ fsf/trunk/libc/libio/fileops.c Sun Aug 21 00:40:24 2011
@@ -345,23 +345,22 @@
   result = _IO_file_open (fp, filename, omode|oflags, oprot, read_write,
 			  is32not64);
 
+  if (result != NULL)
+    {
 #ifndef __ASSUME_O_CLOEXEC
-  if ((fp->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 && __have_o_cloexec <= 0)
-    {
-      int fd = _IO_fileno (fp);
-      if (__have_o_cloexec == 0)
-	{
-	  int flags = __fcntl (fd, F_GETFD);
-	  __have_o_cloexec = (flags & FD_CLOEXEC) == 0 ? -1 : 1;
-	}
-      if (__have_o_cloexec < 0)
-	__fcntl (fd, F_SETFD, FD_CLOEXEC);
-    }
-#endif
-
-#ifdef _LIBC
-  if (result != NULL)
-    {
+      if ((fp->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 && __have_o_cloexec <= 0)
+	{
+	  int fd = _IO_fileno (fp);
+	  if (__have_o_cloexec == 0)
+	    {
+	      int flags = __fcntl (fd, F_GETFD);
+	      __have_o_cloexec = (flags & FD_CLOEXEC) == 0 ? -1 : 1;
+	    }
+	  if (__have_o_cloexec < 0)
+	    __fcntl (fd, F_SETFD, FD_CLOEXEC);
+	}
+#endif
+
       /* Test whether the mode string specifies the conversion.  */
       cs = strstr (last_recognized + 1, ",ccs=");
       if (cs != NULL)
@@ -432,7 +431,6 @@
 	  result->_mode = 1;
 	}
     }
-#endif	/* GNU libc */
 
   return result;
 }

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Sun Aug 21 00:40:24 2011
@@ -1,3 +1,12 @@
+2011-08-20  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* Makefile (tst-cleanup0.out): Fix typo in output redirection.
+
+2011-08-14  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
+	* sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
+
 2011-08-08  Andreas Schwab  <schwab@xxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned

Modified: fsf/trunk/libc/nptl/Makefile
==============================================================================
--- fsf/trunk/libc/nptl/Makefile (original)
+++ fsf/trunk/libc/nptl/Makefile Sun Aug 21 00:40:24 2011
@@ -550,7 +550,7 @@
 		$(patsubst -f%,-fno-%,$(exceptions)) -o $@
 
 $(objpfx)tst-cleanup0.out: /dev/null $(objpfx)tst-cleanup0
-	$(make-test-out) 2>&1 | cmp - tst-cleanup0.expect >& $@
+	$(make-test-out) 2>&1 | cmp - tst-cleanup0.expect > $@
 
 # We only have one kind of startup code files.  Static binaries and
 # shared libraries are build using the PIC version.

Modified: fsf/trunk/libc/nptl/sysdeps/i386/pthreaddef.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/i386/pthreaddef.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/i386/pthreaddef.h Sun Aug 21 00:40:24 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
 
@@ -27,8 +27,14 @@
 /* Minimal stack size after allocating thread descriptor and guard size.  */
 #define MINIMAL_REST_STACK	2048
 
-/* Alignment requirement for TCB.  */
-#define TCB_ALIGNMENT		16
+/* Alignment requirement for TCB.
+
+   Some processors such as Intel Atom pay a big penalty on every
+   access using a segment override if that segment's base is not
+   aligned to the size of a cache line.  (See Intel 64 and IA-32
+   Architectures Optimization Reference Manual, section 13.3.3.3,
+   "Segment Base".)  On such machines, a cache line is 64 bytes.  */
+#define TCB_ALIGNMENT		64
 
 
 /* Location of current stack frame.  */

Modified: fsf/trunk/libc/nptl/sysdeps/x86_64/pthreaddef.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/x86_64/pthreaddef.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/x86_64/pthreaddef.h Sun Aug 21 00:40:24 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2007,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
 
@@ -27,9 +27,17 @@
 /* Minimal stack size after allocating thread descriptor and guard size.  */
 #define MINIMAL_REST_STACK	2048
 
-/* Alignment requirement for TCB.  Need to store post-AVX vector registers
-   in the TCB and we want the storage to be aligned at 32-byte.  */
-#define TCB_ALIGNMENT		32
+/* Alignment requirement for TCB.
+
+   We need to store post-AVX vector registers in the TCB and we want the
+   storage to be aligned to at least 32 bytes.
+
+   Some processors such as Intel Atom pay a big penalty on every
+   access using a segment override if that segment's base is not
+   aligned to the size of a cache line.  (See Intel 64 and IA-32
+   Architectures Optimization Reference Manual, section 13.3.3.3,
+   "Segment Base".)  On such machines, a cache line is 64 bytes.  */
+#define TCB_ALIGNMENT		64
 
 
 /* Location of current stack frame.  The frame pointer is not usable.  */

Modified: fsf/trunk/libc/nss/nss_files/files-alias.c
==============================================================================
--- fsf/trunk/libc/nss/nss_files/files-alias.c (original)
+++ fsf/trunk/libc/nss/nss_files/files-alias.c Sun Aug 21 00:40:24 2011
@@ -1,5 +1,5 @@
 /* Mail alias file parser in nss_files module.
-   Copyright (C) 1996,97,98,99,2002,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 1996-1999,2002,2006,2007,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1996.
 
@@ -166,7 +166,7 @@
       char *line;
 
       /* Check whether the buffer is large enough for even trying to
-         read something.  */
+	 read something.  */
       if (room_left < 2)
 	goto no_more_room;
 
@@ -264,7 +264,7 @@
 		      if (listfile != NULL
 			  && (old_line = strdup (line)) != NULL)
 			{
-			  while (! feof (listfile))
+			  while (! feof_unlocked (listfile))
 			    {
 			      first_unused[room_left - 1] = '\xff';
 			      line = fgets_unlocked (first_unused, room_left,
@@ -335,7 +335,7 @@
 		     just read character.  */
 		  int ch;
 
-		  ch = fgetc (stream);
+		  ch = fgetc_unlocked (stream);
 		  if (ch == EOF || ch == '\n' || !isspace (ch))
 		    {
 		      size_t cnt;

Modified: fsf/trunk/libc/nss/nss_files/files-key.c
==============================================================================
--- fsf/trunk/libc/nss/nss_files/files-key.c (original)
+++ fsf/trunk/libc/nss/nss_files/files-key.c Sun Aug 21 00:40:24 2011
@@ -1,5 +1,5 @@
 /* Public key file parser in nss_files module.
-   Copyright (C) 1996, 1997, 1998, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2006, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -33,9 +33,7 @@
 static enum nss_status
 search (const char *netname, char *result, int *errnop, int secret)
 {
-  FILE *stream;
-
-  stream = fopen (DATAFILE, "r");
+  FILE *stream = fopen (DATAFILE, "re");
   if (stream == NULL)
     return errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
 
@@ -46,7 +44,7 @@
       char *save_ptr;
 
       buffer[sizeof (buffer) - 1] = '\xff';
-      p = fgets (buffer, sizeof (buffer), stream);
+      p = fgets_unlocked (buffer, sizeof (buffer), stream);
       if (p == NULL)
 	{
 	  /* End of file or read error.  */
@@ -58,7 +56,7 @@
 	{
 	  /* Invalid line in file?  Skip remainder of line.  */
 	  if (buffer[sizeof (buffer) - 2] != '\0')
-	    while (getc (stream) != '\n')
+	    while (getc_unlocked (stream) != '\n')
 	      continue;
 	  continue;
 	}

Modified: fsf/trunk/libc/stdio-common/Makefile
==============================================================================
--- fsf/trunk/libc/stdio-common/Makefile (original)
+++ fsf/trunk/libc/stdio-common/Makefile Sun Aug 21 00:40:24 2011
@@ -60,7 +60,7 @@
 	 tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
 	 tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
 	 bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
-	 scanf16 scanf17 tst-setvbuf1 tst-grouping bug23
+	 scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24
 
 test-srcs = tst-unbputc tst-printf
 

Added: fsf/trunk/libc/stdio-common/bug24.c
==============================================================================
--- fsf/trunk/libc/stdio-common/bug24.c (added)
+++ fsf/trunk/libc/stdio-common/bug24.c Sun Aug 21 00:40:24 2011
@@ -1,0 +1,26 @@
+#include <stdio.h>
+#include <errno.h>
+
+static int
+do_test (void)
+{
+  FILE *fp = fopen ("/foobar_does_no_exit", "re");
+  if (fp != NULL)
+    {
+      /* A joker created this file.  Ignore the test.  */
+      fclose (fp);
+      return 0;
+    }
+
+  if (errno == ENOENT)
+    {
+      printf ("no bug\n");
+      return 0;
+    }
+
+  printf ("bug : expected ENOENT, got: %m\n");
+  return 1;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"

Modified: fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps Sun Aug 21 00:40:24 2011
@@ -395,6 +395,8 @@
 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
 double: 1
 idouble: 1
+ildouble: 1
+ldouble: 1
 
 # ctanh
 Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":

Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/scandir64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/scandir64.c (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/scandir64.c Sun Aug 21 00:40:24 2011
@@ -1,0 +1,1 @@
+#include <sysdeps/unix/sysv/linux/i386/scandir64.c>

Removed: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/scandir64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/scandir64.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/scandir64.c (removed)
@@ -1,1 +1,0 @@
-#include <sysdeps/unix/sysv/linux/i386/scandir64.c>

Modified: fsf/trunk/libc/sysdeps/x86_64/dl-trampoline.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/dl-trampoline.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/dl-trampoline.S Sun Aug 21 00:40:24 2011
@@ -27,8 +27,9 @@
 	.align 16
 	cfi_startproc
 _dl_runtime_resolve:
+	cfi_adjust_cfa_offset(16) # Incorporate PLT
 	subq $56,%rsp
-	cfi_adjust_cfa_offset(72) # Incorporate PLT
+	cfi_adjust_cfa_offset(56)
 	movq %rax,(%rsp)	# Preserve registers otherwise clobbered.
 	movq %rcx, 8(%rsp)
 	movq %rdx, 16(%rsp)
@@ -158,14 +159,15 @@
 1:	js	L(no_avx)
 
 #  define RESTORE_AVX
+#  define MORE_CODE
 #  include "dl-trampoline.h"
 
 	.align 16
 L(no_avx):
 # endif
 
-#  undef RESTORE_AVX
-#  include "dl-trampoline.h"
+# undef RESTORE_AVX
+# include "dl-trampoline.h"
 
 	cfi_endproc
 	.size _dl_runtime_profile, .-_dl_runtime_profile

Modified: fsf/trunk/libc/sysdeps/x86_64/dl-trampoline.h
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/dl-trampoline.h (original)
+++ fsf/trunk/libc/sysdeps/x86_64/dl-trampoline.h Sun Aug 21 00:40:24 2011
@@ -1,6 +1,6 @@
 /* Partial PLT profile trampoline to save and restore x86-64 vector
    registers.
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -195,14 +195,14 @@
 	   _dl_call_pltexit.  The La_x86_64_regs is being pointed by rsp now,
 	   so we just need to allocate the sizeof(La_x86_64_retval) space on
 	   the stack, since the alignment has already been taken care of. */
-# ifdef RESTORE_AVX
+#ifdef RESTORE_AVX
 	/* sizeof(La_x86_64_retval).  Need extra space for 2 SSE
 	   registers to detect if xmm0/xmm1 registers are changed
 	   by audit module.  */
 	subq $(LRV_SIZE + XMM_SIZE*2), %rsp
-# else
+#else
 	subq $LRV_SIZE, %rsp	# sizeof(La_x86_64_retval)
-# endif
+#endif
 	movq %rsp, %rcx		# La_x86_64_retval argument to %rcx.
 
 	/* Fill in the La_x86_64_retval structure.  */
@@ -212,7 +212,7 @@
 	movaps %xmm0, LRV_XMM0_OFFSET(%rcx)
 	movaps %xmm1, LRV_XMM1_OFFSET(%rcx)
 
-# ifdef RESTORE_AVX
+#ifdef RESTORE_AVX
 	/* This is to support AVX audit modules.  */
 	vmovdqu %ymm0, LRV_VECTOR0_OFFSET(%rcx)
 	vmovdqu %ymm1, LRV_VECTOR1_OFFSET(%rcx)
@@ -221,14 +221,14 @@
 	   by audit module.  */
 	vmovdqa %xmm0,		  (LRV_SIZE)(%rcx)
 	vmovdqa %xmm1, (LRV_SIZE + XMM_SIZE)(%rcx)
-# endif
+#endif
 
 	fstpt LRV_ST0_OFFSET(%rcx)
 	fstpt LRV_ST1_OFFSET(%rcx)
 
 	movq 24(%rbx), %rdx	# La_x86_64_regs argument to %rdx.
 	movq 40(%rbx), %rsi	# Copy args pushed by PLT in register.
-        movq 32(%rbx), %rdi	# %rdi: link_map, %rsi: reloc_index
+	movq 32(%rbx), %rdi	# %rdi: link_map, %rsi: reloc_index
 	call _dl_call_pltexit
 
 	/* Restore return registers.  */
@@ -238,7 +238,7 @@
 	movaps LRV_XMM0_OFFSET(%rsp), %xmm0
 	movaps LRV_XMM1_OFFSET(%rsp), %xmm1
 
-# ifdef RESTORE_AVX
+#ifdef RESTORE_AVX
 	/* Check if xmm0/xmm1 registers are changed by audit module.  */
 	vpcmpeqq (LRV_SIZE)(%rsp), %xmm0, %xmm2
 	vpmovmskb %xmm2, %esi
@@ -253,7 +253,7 @@
 	vmovdqu LRV_VECTOR1_OFFSET(%rsp), %ymm1
 
 1:
-# endif
+#endif
 
 	fldt LRV_ST1_OFFSET(%rsp)
 	fldt LRV_ST0_OFFSET(%rsp)
@@ -267,3 +267,10 @@
 				# (eats the reloc index and link_map)
 	cfi_adjust_cfa_offset(-48)
 	retq
+
+#ifdef MORE_CODE
+	cfi_adjust_cfa_offset(48)
+	cfi_rel_offset(%rbx, 0)
+	cfi_def_cfa_register(%rbx)
+# undef MORE_CODE
+#endif