qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections
@ 2012-01-07 20:16 Aurelien Jarno
  2012-01-07 20:36 ` Blue Swirl
  0 siblings, 1 reply; 10+ messages in thread
From: Aurelien Jarno @ 2012-01-07 20:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Aurelien Jarno

Fix .rel.plt sections in the output to not only include .rel.plt
sections from the input but also the .rel.iplt sections and to define
the hidden symbols __rel_iplt_start and __rel_iplt_end around
.rel.iplt as otherwise we get undefined references to these when
linking statically to a multiarch enabled libc (using STT_GNU_IFUNC).

Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 sparc.ld |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/sparc.ld b/sparc.ld
index 56efe34..e52c3d2 100644
--- a/sparc.ld
+++ b/sparc.ld
@@ -37,8 +37,20 @@ SECTIONS
   .rela.fini     : { *(.rela.fini)      }
   .rel.bss       : { *(.rel.bss)                }
   .rela.bss      : { *(.rela.bss)               }
-  .rel.plt       : { *(.rel.plt)                }
-  .rela.plt      : { *(.rela.plt)               }
+  .rel.plt      :
+  {
+    *(.rel.plt)
+    PROVIDE_HIDDEN (__rel_iplt_start = .);
+    *(.rel.iplt)
+    PROVIDE_HIDDEN (__rel_iplt_end = .);
+  }
+  .rela.plt       :
+  {
+    *(.rela.plt)
+    PROVIDE_HIDDEN (__rela_iplt_start = .);
+    *(.rela.iplt)
+    PROVIDE_HIDDEN (__rela_iplt_end = .);
+  }
   .init          : { *(.init)   } =0x47ff041f
   .text      :
   {
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-05-19 14:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-07 20:16 [Qemu-devel] [PATCH] sparc-linux-user: Fix missing symbols in .rel/.rela.plt sections Aurelien Jarno
2012-01-07 20:36 ` Blue Swirl
2012-01-07 21:01   ` Aurelien Jarno
2012-01-10 17:38     ` Aurelien Jarno
2012-01-21 18:42       ` Blue Swirl
2013-04-06  6:08       ` [Qemu-devel] " Michael Tokarev
2013-05-08  7:18         ` Michael Tokarev
2013-05-09 17:56           ` Blue Swirl
2013-05-19 12:58             ` Aurelien Jarno
2013-05-19 14:51               ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).