This is an automated email from the git hooks/post-receive script.

adconrad pushed a commit to branch sid
in repository glibc.

commit 2f27338195604ab5bd75681d9a19202630238e2d
Author: Adam Conrad <adcon...@0c3.net>
Date:   Wed Jul 12 12:53:48 2017 -0600

    debian/patches/arm/submitted-strip-bit-0.diff: Fix ld.so crash on armv7t.
---
 debian/changelog                              |  1 +
 debian/patches/arm/submitted-strip-bit-0.diff | 30 +++++++++++++++++++++++++++
 debian/patches/series                         |  1 +
 3 files changed, 32 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 2a19f6c..bdcf17c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ glibc (2.24-13) UNRELEASED; urgency=medium
   [ Adam Conrad ]
   * debian/patches/any/cvs-common-symbols.diff: Fix build with newer binutils.
   * debian/patches/arm/cvs-rtld-startup.diff: Fix ld.so segfault on arm64.
+  * debian/patches/arm/submitted-strip-bit-0.diff: Fix ld.so crash on armv7t.
 
  -- Aurelien Jarno <aure...@debian.org>  Mon, 19 Jun 2017 17:36:36 +0200
 
diff --git a/debian/patches/arm/submitted-strip-bit-0.diff 
b/debian/patches/arm/submitted-strip-bit-0.diff
new file mode 100644
index 0000000..751da24
--- /dev/null
+++ b/debian/patches/arm/submitted-strip-bit-0.diff
@@ -0,0 +1,30 @@
+2017-07-12  Jiong Wang  <jiong.w...@arm.com>
+
+        * sysdeps/arm/dl-machine.h (elf_machine_load_address):  Also strip bit 0
+        of pcrel_address under Thumb mode.
+
+diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
+index 
7053ead16ed0e7dac182660f7d88fa21f2b4799a..5b67e3d004818308d9bf93effb13d23a762e160f
 100644
+--- a/sysdeps/arm/dl-machine.h
++++ b/sysdeps/arm/dl-machine.h
+@@ -56,11 +56,19 @@ elf_machine_load_address (void)
+   extern Elf32_Addr internal_function __dl_start (void *) asm ("_dl_start");
+   Elf32_Addr got_addr = (Elf32_Addr) &__dl_start;
+   Elf32_Addr pcrel_addr;
++  asm ("adr %0, _dl_start" : "=r" (pcrel_addr));
+ #ifdef __thumb__
+-  /* Clear the low bit of the funciton address.  */
++  /* Clear the low bit of the funciton address.
++
++     NOTE: got_addr is from GOT table whose lsb is always set by linker if 
it's
++     Thumb function address.  PCREL_ADDR comes from PC-relative calculation
++     which will finish during assembling.  GAS assembler before the fix for
++     PR gas/21458 was not setting the lsb but does after that.  Always do the
++     strip for both, so the code works with various combinations of glibc and
++     Binutils.  */
+   got_addr &= ~(Elf32_Addr) 1;
++  pcrel_addr &= ~(Elf32_Addr) 1;
+ #endif
+-  asm ("adr %0, _dl_start" : "=r" (pcrel_addr));
+   return pcrel_addr - got_addr;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index b42af9a..7c91ab6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -47,6 +47,7 @@ arm/local-vfp-sysdeps.diff
 arm/unsubmitted-ldso-multilib.diff
 arm/local-arm-futex.diff
 arm/cvs-rtld-startup.diff
+arm/submitted-strip-bit-0.diff
 
 hppa/local-inlining.diff
 hppa/local-elf-make-cflags.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-glibc/glibc.git

Reply via email to