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 hjl/pr14995 updated. glibc-2.25-591-g92463ec


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, hjl/pr14995 has been updated
       via  92463eccb4d5c72290e36a3a1a6e92aac3f48215 (commit)
       via  cc28548b1eb6055497b9b6549f0565bd4d20b942 (commit)
      from  5a96b432bead8161e5bab3923603bd666df6a584 (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=92463eccb4d5c72290e36a3a1a6e92aac3f48215

commit 92463eccb4d5c72290e36a3a1a6e92aac3f48215
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Jun 26 12:46:08 2017 -0700

    Check linker support for INSERT in linker script
    
    Since gold doesn't support INSERT in linker script:
    
    https://sourceware.org/bugzilla/show_bug.cgi?id=21676
    
    tst-split-dynreloc fails to link with gold.  Check if linker supports
    INSERT in linker script before using it.
    
    	* config.make.in (have-insert): New.
    	* configure.ac (libc_cv_insert): New.  Set to yes if linker
    	supports INSERT in linker script.
    	(AC_SUBST(libc_cv_insert): New.
    	* configure: Regenerated.
    	* sysdeps/x86_64/Makefile (tests): Add tst-split-dynreloc only
    	if $(have-insert) == yes.

diff --git a/config.make.in b/config.make.in
index dadabf9..c7edfc1 100644
--- a/config.make.in
+++ b/config.make.in
@@ -54,6 +54,7 @@ enable-werror = @enable_werror@
 have-z-combreloc = @libc_cv_z_combreloc@
 have-z-execstack = @libc_cv_z_execstack@
 have-protected-data = @libc_cv_protected_data@
+have-insert = @libc_cv_insert@
 have-glob-dat-reloc = @libc_cv_has_glob_dat@
 with-fp = @with_fp@
 enable-timezone-tools = @enable_timezone_tools@
diff --git a/configure b/configure
index b55fc92..a9ed3b3 100755
--- a/configure
+++ b/configure
@@ -629,6 +629,7 @@ libc_cv_z_execstack
 libc_cv_z_combreloc
 ASFLAGS_config
 libc_cv_cc_with_libunwind
+libc_cv_insert
 libc_cv_protected_data
 BISON
 INSTALL_INFO
@@ -5703,6 +5704,38 @@ fi
 $as_echo "$libc_cv_protected_data" >&6; }
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for INSERT in linker script" >&5
+$as_echo_n "checking linker support for INSERT in linker script... " >&6; }
+if ${libc_cv_insert+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.c <<EOF
+		const int __attribute__ ((section(".bar"))) bar = 0x12345678;
+		int test (void) { return bar; }
+EOF
+		cat > conftest.t <<EOF
+		SECTIONS
+		{
+		  .bar : { *(.bar) }
+		}
+		INSERT AFTER .rela.dyn;
+EOF
+		libc_cv_insert=no
+		if { ac_try='${CC-cc} -nostdlib -nostartfiles $no_ssp -fPIC -shared conftest.c -Wl,-T,conftest.t -o conftest.so'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+		  libc_cv_insert=yes
+		fi
+		rm -f conftest.*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_insert" >&5
+$as_echo "$libc_cv_insert" >&6; }
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken __attribute__((alias()))" >&5
 $as_echo_n "checking for broken __attribute__((alias()))... " >&6; }
 if ${libc_cv_broken_alias_attribute+:} false; then :
diff --git a/configure.ac b/configure.ac
index 5f62ecb..807961f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1291,6 +1291,27 @@ EOF
 	       ])
 AC_SUBST(libc_cv_protected_data)
 
+AC_CACHE_CHECK(linker support for INSERT in linker script,
+	       libc_cv_insert,
+	       [cat > conftest.c <<EOF
+		const int __attribute__ ((section(".bar"))) bar = 0x12345678;
+		int test (void) { return bar; }
+EOF
+		cat > conftest.t <<EOF
+		SECTIONS
+		{
+		  .bar : { *(.bar) }
+		}
+		INSERT AFTER .rela.dyn;
+EOF
+		libc_cv_insert=no
+		if AC_TRY_COMMAND([${CC-cc} -nostdlib -nostartfiles $no_ssp -fPIC -shared conftest.c -Wl,-T,conftest.t -o conftest.so]); then
+		  libc_cv_insert=yes
+		fi
+		rm -f conftest.*
+	       ])
+AC_SUBST(libc_cv_insert)
+
 AC_CACHE_CHECK(for broken __attribute__((alias())),
 	       libc_cv_broken_alias_attribute,
 	       [cat > conftest.c <<EOF
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index 5075c91..948faa9 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -59,9 +59,11 @@ test-extras += tst-audit4-aux tst-audit10-aux \
 extra-test-objs += tst-audit4-aux.o tst-audit10-aux.o \
 		   tst-avx-aux.o tst-avx512-aux.o
 
+ifeq ($(have-insert),yes)
 tests += tst-split-dynreloc
 LDFLAGS-tst-split-dynreloc = -Wl,-T,$(..)sysdeps/x86_64/tst-split-dynreloc.lds
 tst-split-dynreloc-ENV = LD_BIND_NOW=1
+endif
 
 modules-names += tst-auditmod3a tst-auditmod3b \
 		tst-auditmod4a tst-auditmod4b \

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

commit cc28548b1eb6055497b9b6549f0565bd4d20b942
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Jun 26 11:19:41 2017 -0700

    Run vismain only if linker supports protected data symbol
    
    Gold doesn't support protected data symbol:
    
    configure:5672: checking linker support for protected data symbol
    configure:5682: gcc -fuse-ld=gold -nostdlib -nostartfiles -fno-stack-protector -fPIC -shared conftest.c -o conftest.so
    configure:5685: $? = 0
    configure:5692: gcc -fuse-ld=gold -nostdlib -nostartfiles -fno-stack-protector conftest.c -o conftest conftest.so
    /usr/local/bin/ld.gold: error: /tmp/ccXWoofs.o: cannot make copy relocation for protected symbol 'bar', defined in conftest.so
    collect2: error: ld returned 1 exit status
    
    Run vismain only if linker supports protected data symbol.
    
    	* elf/Makefile (tests): Add vismain only if
    	$(have-protected-data) == yes.
    	(tests-pie): Likewise.

diff --git a/elf/Makefile b/elf/Makefile
index 201b328..62084b4 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -289,10 +289,12 @@ ifeq (yesyes,$(have-fpie)$(build-shared))
 modules-names += tst-piemod1
 tests += tst-pie1 tst-pie2
 tests-pie += tst-pie1 tst-pie2
+ifeq (yes,$(have-protected-data))
 tests += vismain
 tests-pie += vismain
 CFLAGS-vismain.c = $(PIE-ccflag)
 endif
+endif
 modules-execstack-yes = tst-execstack-mod
 extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
 

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

Summary of changes:
 config.make.in          |    1 +
 configure               |   33 +++++++++++++++++++++++++++++++++
 configure.ac            |   21 +++++++++++++++++++++
 elf/Makefile            |    2 ++
 sysdeps/x86_64/Makefile |    2 ++
 5 files changed, 59 insertions(+), 0 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]