aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-2.17/0001-R_ARM_TLS_DTPOFF32.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-01-03 23:28:20 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-28 12:25:35 +0000
commit83b6fe6d91b924be5a7676e6ee973ce26b5eefc5 (patch)
treef692bba185aecc7e056d64cfb6be6cd247448014 /meta/recipes-core/eglibc/eglibc-2.17/0001-R_ARM_TLS_DTPOFF32.patch
parent50354ebece43a6c13f9ca592e7d230765a26fdf8 (diff)
downloadopenembedded-core-contrib-83b6fe6d91b924be5a7676e6ee973ce26b5eefc5.tar.gz
eglibc: Upgrade recipes 2.16 -> 2.17
Drop patches that are applied upstream Fix the license checksums for changes in LICENSES file the new changes add more copyright notices that were missing earlier Moving ports is no longer needed since ports is now part of libc proper Refresh tzselect-sh.patch to accomodate upstream changes C++ headers discovery relative to target sysroot is fixed differently upstream hence we drop use-sysroot-cxx-headers.patch aarch64 support is already available in 2.17 hence drop the local patches Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-2.17/0001-R_ARM_TLS_DTPOFF32.patch')
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/0001-R_ARM_TLS_DTPOFF32.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/0001-R_ARM_TLS_DTPOFF32.patch b/meta/recipes-core/eglibc/eglibc-2.17/0001-R_ARM_TLS_DTPOFF32.patch
new file mode 100644
index 0000000000..b4489e9ae9
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/0001-R_ARM_TLS_DTPOFF32.patch
@@ -0,0 +1,56 @@
+
+Quote from bug 1443 which explains what the patch does :
+
+ We build some random program and link it with -lust. When we run it,
+ it dies with a SIGSEGV before reaching main().
+
+ Libust.so depends on liburcu-bp.so from the usermode-rcu package.
+ Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this
+ is critical.
+
+ Libust.so uses a TLS / __thread variable that is defined in liburcu-
+ bp.so. There are special ARM-specific relocation types that allow two
+ shared libraries to share thread-specific data. This is critical too.
+
+ One more critical issue: although liburcu-bp.so is prelinked, we can't
+ load it at its prelinked address, because we also link against
+ librt.so, and librt.so uses that address.
+
+ The dynamic linker is forced to relink liburcu-bp.so at a different
+ address. In the course of relinking, it processes the special ARM
+ relocation record mentioned above. The prelinker has already filled
+ in the information, which is a short offset into a table of thread-
+ specific data that is allocated per-thread for each library that uses
+ TLS. Because the normal behavior of a relocation is to add the symbol
+ value to an addend stored at the address being relocated, we end up
+ adding the short offset to itself, doubling it.
+
+ Now we have an awkward situation. The libust.so library doesn't know
+ about the addend, so its TLS data for this element is correct. The
+ liburcu-bp.so library has a different offset for the element. When we
+ go to initialize the element for the first time in liburcu-bp.so, we
+ write the address of the result at the doubled (broken) offset.
+ Later, when we refer to the address from libust.so, we check the value
+ at the correct offset, but it's NULL, so we eat hot SIGSEGV.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
+---
+ .../libc/ports/sysdeps/arm/dl-machine.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+ndex 8d905e8..dcfa71e 100644
+--- libc.orig/ports/sysdeps/arm/dl-machine.h
++++ libc/ports/sysdeps/arm/dl-machine.h
+@@ -503,7 +503,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
+
+ case R_ARM_TLS_DTPOFF32:
+ if (sym != NULL)
+- *reloc_addr += sym->st_value;
++ *reloc_addr = sym->st_value;
+ break;
+
+ case R_ARM_TLS_TPOFF32:
+--
+