From mboxrd@z Thu Jan 1 00:00:00 1970 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 From: Aurelien Jarno Date: Sat, 7 Jan 2012 21:16:56 +0100 Message-Id: <1325967416-1760-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH] sparc-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: 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 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 : { -- 1.7.7.3