This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.25-102-gd40dbe7
- From: azanella at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 12 Mar 2017 22:56:54 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.25-102-gd40dbe7
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 d40dbe722f004f999b589de776f7e57e564dda01 (commit)
from cb09a3d49742aa4b8e541334e2e49e8cb9b652e2 (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=d40dbe722f004f999b589de776f7e57e564dda01
commit d40dbe722f004f999b589de776f7e57e564dda01
Author: Alexey Neyman <stilor@att.net>
Date: Wed Feb 8 16:00:57 2017 -0200
sh: Fix building with gcc5/6
Build glibc for sh4-unknown-linux-gnu currently fails if one's
using GCC5/6: in dl-conflict.c, the elf_machine_rela() function
is called with NULL as its 3rd argument, sym. The implementation
of that function in sysdeps/sh/dl-machine.h dereferences that pointer:
const Elf32_Sym *const refsym = sym;
...
if (map == &GL(dl_rtld_map))
value -= map->l_addr + refsym->st_value + reloc->r_addend;
GCC discovers a null pointer dereference, and in accordance with
-fdelete-null-pointer-checks (which is enabled in -O2) replaces this
code with a trap - which, as SH does not implement a trap pattern in
GCC, evaluates to an abort() call. This abort() call pulls many more
objects from libc_nonshared.a, eventually resulting in link failure
due to multiple definitions for a number of symbols.
As far as I see, the conditional before this code is always false in
rtld: _dl_resolve_conflicts() is called with main_map as the first
argument, not GL(_dl_rtld_map), but since that call is in yet another
compilation unit, GCC does not know about it. Patch that wraps this
conditional into !defined RESOLVE_CONFLICT_FIND_MAP attached.
* sysdeps/sh/dl-machine.h (elf_machine_rela): The condition
in R_SH_DIR32 case is always false when inlined from
dl-conflict.c. Ifdef out to prevent GCC from insertin an
abort() call.
diff --git a/ChangeLog b/ChangeLog
index 0aedae8..9ccb1a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-03-12 Alexey Neyman <stilor@att.net>
+
+ * sysdeps/sh/dl-machine.h (elf_machine_rela): The condition
+ in R_SH_DIR32 case is always false when inlined from
+ dl-conflict.c. Ifdef out to prevent GCC from insertin an
+
2016-03-12 Marko Myllynen <myllynen@redhat.com>
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h
index 449deea..2b468af 100644
--- a/sysdeps/sh/dl-machine.h
+++ b/sysdeps/sh/dl-machine.h
@@ -389,7 +389,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
break;
case R_SH_DIR32:
{
-#ifndef RTLD_BOOTSTRAP
+#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP
/* This is defined in rtld.c, but nowhere in the static
libc.a; make the reference weak so static programs can
still link. This declaration cannot be done when
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
sysdeps/sh/dl-machine.h | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU C Library master sources