From patchwork Sat Jan 7 20:16:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 134866 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B1BA1B6F71 for ; Sun, 8 Jan 2012 07:16:52 +1100 (EST) Received: from localhost ([::1]:54371 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rjch5-0007C0-Qy for incoming@patchwork.ozlabs.org; Sat, 07 Jan 2012 15:16:47 -0500 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 Received: from [2001:470:d4ed:0:5e26:aff:fe2b:6f5b] (helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1Rjcgx-0004fG-HE; Sat, 07 Jan 2012 21:16:39 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.77) (envelope-from ) id 1Rjcgv-0000R1-TF; Sat, 07 Jan 2012 21:16:38 +0100 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Sat, 7 Jan 2012 21:16:35 +0100 Message-Id: <1325967395-1633-1-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.7.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 88.191.126.93 Cc: Alexander Graf , Aurelien Jarno Subject: [Qemu-devel] [PATCH] ppc-linux-user: Fix missing symbols in .rel/.rela.plt sections X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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))