This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.26-92-gfbdc1e3


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  fbdc1e3e8de7f49e439b6e274d3e7e07da78416e (commit)
       via  b3f85fd2e43b1d69384396a6d99fa2135dbf46e3 (commit)
       via  630bf4916f10bdba28a99480ef32170b977ea5fc (commit)
       via  9fa7449b35244645acaa450046b37678f46fe0f1 (commit)
      from  73322d5ff6ad71c65f875095c4801771cff9ab2d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fbdc1e3e8de7f49e439b6e274d3e7e07da78416e

commit fbdc1e3e8de7f49e439b6e274d3e7e07da78416e
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Aug 14 13:03:34 2017 +0200

    i386: Do not set internal_function
    
    All calls to functions with the internal_function attribute
    have been removed from assembler implementations, which means that
    the definition of internal_function can be changed at the C level
    without causing ABI issues with assembler code.
    
    _dl_fixup still uses a regparm calling convention on i386, but this
    is controlled through ARCH_FIXUP_ATTRIBUTE, not internal_function.

diff --git a/ChangeLog b/ChangeLog
index ac21eae..2adb6bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2017-08-14  Florian Weimer  <fweimer@redhat.com>
 
+	i386: Do not set internal_function.
+	* config.h.in (USE_REGPARMS, internal_function): Remove.
+	* sysdeps/i386/configure.ac (USE_REGPARMS): Likewise.
+	* sysdeps/i386/configure (USE_REGPARMS): Likewise.
+
+2017-08-14  Florian Weimer  <fweimer@redhat.com>
+
 	* elf/dl-init.c (_dl_init): Remove internal_function.
 	* sysdeps/generic/ldsodefs.h (_dl_init): Likewise.
 	* sysdeps/i386/dl-machine.h (RTLD_START): Adjust call to _dl_init.
diff --git a/config.h.in b/config.h.in
index 2241857..014fb4e 100644
--- a/config.h.in
+++ b/config.h.in
@@ -47,10 +47,6 @@
 #undef	STACK_PROTECTOR_LEVEL
 #endif
 
-/* Define if the regparm attribute shall be used for local functions
-   (gcc on ix86 only).  */
-#undef	USE_REGPARMS
-
 /* Defined on SPARC if GCC emits GOTDATA relocations.  */
 #undef  HAVE_GCC_GOTDATA
 
@@ -100,12 +96,6 @@
 #undef HAVE_AARCH64_BE
 
 
-/* Defined to some form of __attribute__ ((...)) if the compiler supports
-   a different, more efficient calling convention.  */
-#if defined USE_REGPARMS && !defined PROF
-# define internal_function __attribute__ ((regparm (3), stdcall))
-#endif
-
 /* Linux specific: minimum supported kernel version.  */
 #undef	__LINUX_KERNEL_VERSION
 
diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure
index 5b55c5a..4d6685f 100644
--- a/sysdeps/i386/configure
+++ b/sysdeps/i386/configure
@@ -77,8 +77,5 @@ if test $libc_cv_asm_mpx = yes; then
 
 fi
 
-$as_echo "#define USE_REGPARMS 1" >>confdefs.h
-
-
 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
 
diff --git a/sysdeps/i386/configure.ac b/sysdeps/i386/configure.ac
index 19ef33f..f7766ad 100644
--- a/sysdeps/i386/configure.ac
+++ b/sysdeps/i386/configure.ac
@@ -45,8 +45,6 @@ if test $libc_cv_asm_mpx = yes; then
   AC_DEFINE(HAVE_MPX_SUPPORT)
 fi
 
-AC_DEFINE(USE_REGPARMS)
-
 dnl It is always possible to access static and hidden symbols in an
 dnl position independent way.
 AC_DEFINE(PI_STATIC_AND_HIDDEN)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b3f85fd2e43b1d69384396a6d99fa2135dbf46e3

commit b3f85fd2e43b1d69384396a6d99fa2135dbf46e3
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Aug 14 12:57:50 2017 +0200

    _dl_init: Remove internal_function attribute
    
    The function is called from the i386 startup code, which needs minor
    adjustments due to the changed ABI.

diff --git a/ChangeLog b/ChangeLog
index 74ad96d..ac21eae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2017-08-14  Florian Weimer  <fweimer@redhat.com>
 
+	* elf/dl-init.c (_dl_init): Remove internal_function.
+	* sysdeps/generic/ldsodefs.h (_dl_init): Likewise.
+	* sysdeps/i386/dl-machine.h (RTLD_START): Adjust call to _dl_init.
+
+2017-08-14  Florian Weimer  <fweimer@redhat.com>
+
 	* elf/rtld.c (_dl_start): Remove internal_function.
 	* sysdeps/i386/dl-machine.h (RTLD_START): Adjust call to
 	_dl_start.
diff --git a/elf/dl-init.c b/elf/dl-init.c
index 5c5f3de..fb37345 100644
--- a/elf/dl-init.c
+++ b/elf/dl-init.c
@@ -75,7 +75,6 @@ call_init (struct link_map *l, int argc, char **argv, char **env)
 
 
 void
-internal_function
 _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
 {
   ElfW(Dyn) *preinit_array = main_map->l_info[DT_PREINIT_ARRAY];
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 4540096..49e673d 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -964,7 +964,7 @@ extern int _dl_check_map_versions (struct link_map *map, int verbose,
 /* Initialize the object in SCOPE by calling the constructors with
    ARGC, ARGV, and ENV as the parameters.  */
 extern void _dl_init (struct link_map *main_map, int argc, char **argv,
-		      char **env) internal_function attribute_hidden;
+		      char **env) attribute_hidden;
 
 /* Call the finalizer functions of all shared objects whose
    initializer functions have completed.  */
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 924de95..2e17eba 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -177,17 +177,20 @@ _dl_start_user:\n\
 	# switch stacks if it moves these contents over.\n\
 " RTLD_START_SPECIAL_INIT "\n\
 	# Load the parameters again.\n\
-	# (eax, edx, ecx, *--esp) = (_dl_loaded, argc, argv, envp)\n\
+	# (eax, edx, ecx, esi) = (_dl_loaded, argc, argv, envp)\n\
 	movl _rtld_local@GOTOFF(%ebx), %eax\n\
 	leal 8(%esp,%edx,4), %esi\n\
 	leal 4(%esp), %ecx\n\
 	movl %esp, %ebp\n\
 	# Make sure _dl_init is run with 16 byte aligned stack.\n\
 	andl $-16, %esp\n\
-	pushl %eax\n\
-	pushl %eax\n\
+        subl $12, %esp\n\
 	pushl %ebp\n\
+        # Arguments for _dl_init.\n\
 	pushl %esi\n\
+	pushl %ecx\n\
+	pushl %edx\n\
+	pushl %eax\n\
 	# Clear %ebp, so that even constructors have terminated backchain.\n\
 	xorl %ebp, %ebp\n\
 	# Call the function to run the initializers.\n\
@@ -195,7 +198,7 @@ _dl_start_user:\n\
 	# Pass our finalizer function to the user in %edx, as per ELF ABI.\n\
 	leal _dl_fini@GOTOFF(%ebx), %edx\n\
 	# Restore %esp _start expects.\n\
-	movl (%esp), %esp\n\
+	movl 16(%esp), %esp\n\
 	# Jump to the user's entry point.\n\
 	jmp *%edi\n\
 	.previous\n\

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=630bf4916f10bdba28a99480ef32170b977ea5fc

commit 630bf4916f10bdba28a99480ef32170b977ea5fc
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Aug 14 12:29:21 2017 +0200

    _dl_start: Remove internal_function attribute
    
    The i386 startup code needs adjusting because it calls the function
    and the ABI has changed.

diff --git a/ChangeLog b/ChangeLog
index bf655ed..74ad96d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2017-08-14  Florian Weimer  <fweimer@redhat.com>
 
+	* elf/rtld.c (_dl_start): Remove internal_function.
+	* sysdeps/i386/dl-machine.h (RTLD_START): Adjust call to
+	_dl_start.
+
+2017-08-14  Florian Weimer  <fweimer@redhat.com>
+
 	* elf/dl-fini.c (_dl_fini): Remove internal_function
 	* sysdeps/generic/ldsodefs.h (_dl_fini): Likewise.
 
diff --git a/elf/rtld.c b/elf/rtld.c
index 1772f89..d8e75c0 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -439,7 +439,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
   return start_addr;
 }
 
-static ElfW(Addr) __attribute_used__ internal_function
+static ElfW(Addr) __attribute_used__
 _dl_start (void *arg)
 {
 #ifdef DONT_USE_BOOTSTRAP_MAP
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 9ee9d02..924de95 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -150,9 +150,11 @@ extern ElfW(Addr) _dl_profile_fixup (struct link_map *l,
 .globl _start\n\
 .globl _dl_start_user\n\
 _start:\n\
-	# Note that _dl_start gets the parameter in %eax.\n\
 	movl %esp, %eax\n\
+        subl $12, %esp\n\
+        pushl %eax\n\
 	call _dl_start\n\
+        addl $16, %esp\n\
 _dl_start_user:\n\
 	# Save the user entry point address in %edi.\n\
 	movl %eax, %edi\n\

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9fa7449b35244645acaa450046b37678f46fe0f1

commit 9fa7449b35244645acaa450046b37678f46fe0f1
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Aug 14 11:44:24 2017 +0200

    _dl_fini: Remove internal_function attribute
    
    Assembler code passes the address of _dl_fini to __libc_start_main,
    whose function pointer argument lacks the attribute.  This means
    that calls could use the wrong ABI.  Fortunately, for zero-parameter
    void-returning functions, internal_function does not change ABI
    on i386 (the only architecture which uses internal_function), so
    this inconsistency was harmless (which is why it had not been
    noticed so far).

diff --git a/ChangeLog b/ChangeLog
index 7527943..bf655ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-08-14  Florian Weimer  <fweimer@redhat.com>
+
+	* elf/dl-fini.c (_dl_fini): Remove internal_function
+	* sysdeps/generic/ldsodefs.h (_dl_fini): Likewise.
+
 2017-08-14  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* sysdeps/x86/cpu-features.h (bit_cpu_BIT): New.
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
index 93b337b..d6201b2 100644
--- a/elf/dl-fini.c
+++ b/elf/dl-fini.c
@@ -125,7 +125,6 @@ _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
 
 
 void
-internal_function
 _dl_fini (void)
 {
   /* Lots of fun ahead.  We have to call the destructors for all still
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 3c92a29..4540096 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -968,7 +968,7 @@ extern void _dl_init (struct link_map *main_map, int argc, char **argv,
 
 /* Call the finalizer functions of all shared objects whose
    initializer functions have completed.  */
-extern void _dl_fini (void) internal_function;
+extern void _dl_fini (void);
 
 /* Sort array MAPS according to dependencies of the contained objects.  */
 extern void _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used,

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                  |   24 ++++++++++++++++++++++++
 config.h.in                |   10 ----------
 elf/dl-fini.c              |    1 -
 elf/dl-init.c              |    1 -
 elf/rtld.c                 |    2 +-
 sysdeps/generic/ldsodefs.h |    4 ++--
 sysdeps/i386/configure     |    3 ---
 sysdeps/i386/configure.ac  |    2 --
 sysdeps/i386/dl-machine.h  |   15 ++++++++++-----
 9 files changed, 37 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]