This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch hjl/pr19178/master created. glibc-2.22-477-g6ecf7e3
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 28 Oct 2015 11:47:30 -0000
- Subject: GNU C Library master sources branch hjl/pr19178/master created. glibc-2.22-477-g6ecf7e3
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/pr19178/master has been created
at 6ecf7e3fafbadcd6e8d9dcb9d115e47f4d7868fb (commit)
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ecf7e3fafbadcd6e8d9dcb9d115e47f4d7868fb
commit 6ecf7e3fafbadcd6e8d9dcb9d115e47f4d7868fb
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Oct 28 04:43:26 2015 -0700
Define ELF_RTYPE_CLASS_TLS/ELF_RTYPE_CLASS_IFUNC
_dl_debug_bindings updates relocation type class with 4 and 8. But
ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA may be defined to 4. This patch
adds ELF_RTYPE_CLASS_TLS/ELF_RTYPE_CLASS_IFUNC and use them in
_dl_debug_bindings.
[BZ #19178]
* dl-lookup.c (_dl_debug_bindings): Replace 4 and 8 with
ELF_RTYPE_CLASS_TLS and ELF_RTYPE_CLASS_IFUNC.
* sysdeps/generic/ldsodefs.h (ELF_RTYPE_CLASS_TLS): New.
(ELF_RTYPE_CLASS_IFUNC): Likewise.
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 581fb20..9f2643f 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -1073,16 +1073,16 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
{
if (__glibc_unlikely (ELFW(ST_TYPE) (value->s->st_info)
== STT_TLS))
- type_class = 4;
+ type_class = ELF_RTYPE_CLASS_TLS;
else if (__glibc_unlikely (ELFW(ST_TYPE) (value->s->st_info)
== STT_GNU_IFUNC))
- type_class |= 8;
+ type_class |= ELF_RTYPE_CLASS_IFUNC;
}
if (conflict
|| GLRO(dl_trace_prelink_map) == undef_map
|| GLRO(dl_trace_prelink_map) == NULL
- || type_class >= 4)
+ || type_class >= ELF_RTYPE_CLASS_TLS)
{
_dl_printf ("%s 0x%0*Zx 0x%0*Zx -> 0x%0*Zx 0x%0*Zx ",
conflict ? "conflict" : "lookup",
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index a8caf47..5f96540 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -122,6 +122,10 @@ typedef struct link_map *lookup_t;
#else
# define ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA 0
#endif
+/* ELF_RTYPE_CLASS_TLS and ELF_RTYPE_CLASS_IFUNC are only used in
+ _dl_debug_bindings. They must be the highest ones. */
+#define ELF_RTYPE_CLASS_TLS 8
+#define ELF_RTYPE_CLASS_IFUNC 16
/* ELF uses the PF_x macros to specify the segment permissions, mmap
uses PROT_xxx. In most cases the three macros have the values 1, 2,
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources