From patchwork Sat Jan 7 20:16:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 134867 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 97D51B6F71 for ; Sun, 8 Jan 2012 07:17:10 +1100 (EST) Received: from localhost ([::1]:55629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjchN-0007ql-Gc for incoming@patchwork.ozlabs.org; Sat, 07 Jan 2012 15:17:05 -0500 Received: from eggs.gnu.org ([140.186.70.92]:44337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjchJ-0007qd-1u for qemu-devel@nongnu.org; Sat, 07 Jan 2012 15:17:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjchH-0002TK-TY for qemu-devel@nongnu.org; Sat, 07 Jan 2012 15:17:00 -0500 Received: from hall.aurel32.net ([88.191.126.93]:58711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjchH-0002TG-Ne for qemu-devel@nongnu.org; Sat, 07 Jan 2012 15:16:59 -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 1RjchG-0004fe-TH; Sat, 07 Jan 2012 21:16:59 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.77) (envelope-from ) id 1RjchF-0000T6-PD; Sat, 07 Jan 2012 21:16:57 +0100 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Sat, 7 Jan 2012 21:16:56 +0100 Message-Id: <1325967416-1760-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: Aurelien Jarno Subject: [Qemu-devel] [PATCH] sparc-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). Blue Swirl Signed-off-by: Aurelien Jarno --- 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 : {