]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
microblaze: Resolve non-relocatable branch in pt-vfork.S (BZ#21779)
authorNathan Rossi <nathan@nathanrossi.com>
Fri, 28 Jul 2017 12:21:14 +0000 (09:21 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 28 Jul 2017 12:21:14 +0000 (09:21 -0300)
The relative branch directly to __libc_vfork results in an relocation
that cannot be resolved. Specifically a R_MICROBLAZE_64_PCREL relocation
is created for this branch, however for MicroBlaze R_MICROBLAZE_64_PCREL
type relocations symbols are not resolved. Additionally due to the
branch being located in the .text section the instruction cannot be
rewritten as the section is not writable, and causes a segfault at
runtime when loading libpthread.

To resolve this issue, ensure the branch is done using PLT. This removes
the need to modify the instruction and trades the R_MICROBLAZE_64_PCREL
for a more common R_MICROBLAZE_JUMP via the PLT.

[BZ #21779]
* sysdeps/unix/sysv/linux/microblaze/pt-vfork.S: Branch using PLT.

ChangeLog
sysdeps/unix/sysv/linux/microblaze/pt-vfork.S

index 8b76a6dde8cd0b110c50ba7e4d143eb6b088ffcc..4cec993f99c9b7aade83f5c49c1435a6a6716ac2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2017-07-23  Nathan Rossi  <nathan@nathanrossi.com>
 
+       [BZ #21779]
+       * sysdeps/unix/sysv/linux/microblaze/pt-vfork.S: Branch using PLT.
+
        * sysdeps/microblaze/libm-test-ulps: Update.
 
 2017-07-28  Chung-Lin Tang  <cltang@codesourcery.com>
index f201f0429fd86e390ae85e72b68352680056e528..d8339f21f7d0c108a5e50ed2c79b434bcfe1667d 100644 (file)
@@ -34,7 +34,7 @@
        || SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_20))
 
 ENTRY (vfork_compat)
-       bri     __libc_vfork
+       bri     __libc_vfork@PLT
 END (vfork_compat)
 
 #endif