Received: from eggs.gnu.org ([140.186.70.92]:44288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rjcgz-0007Bi-Pn for qemu-devel@nongnu.org; Sat, 07 Jan 2012 15:16:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rjcgy-0002Rz-Kw for qemu-devel@nongnu.org; Sat, 07 Jan 2012 15:16:41 -0500 Received: from hall.aurel32.net ([88.191.126.93]:58710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rjcgy-0002Rv-F3 for qemu-devel@nongnu.org; Sat, 07 Jan 2012 15:16:40 -0500 From: Aurelien Jarno Date: Sat, 7 Jan 2012 21:16:35 +0100 Message-Id: <1325967395-1633-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH] ppc-linux-user: Fix missing symbols in .rel/.rela.plt sections List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexander Graf , 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). Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- ppc.ld | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ppc.ld b/ppc.ld index 69aa3f2..1c0bcf1 100644 --- a/ppc.ld +++ b/ppc.ld @@ -49,8 +49,20 @@ SECTIONS .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) } .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } - .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 : { KEEP (*(.init)) -- 1.7.7.3