From patchwork Thu Mar 22 14:38:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 132294 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp929918ljb; Thu, 22 Mar 2018 07:39:34 -0700 (PDT) X-Google-Smtp-Source: AG47ELsNcKimAvuaO136khW5rE54DcUE9JcTQuE6SiqlM8eDrJp54IPQUqcwpRewmDotMDrOgPjM X-Received: by 2002:a17:902:684d:: with SMTP id f13-v6mr15245567pln.230.1521729574476; Thu, 22 Mar 2018 07:39:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521729574; cv=none; d=google.com; s=arc-20160816; b=rjph2tq9qMAH42noLyAKe/Kxbb1VQsCUuMs/+HpFKX25CtgbbufXRKr2MI/3h3/YMn IlBoJwYGRDt6rnygZr0g9HyJn2Vazec3OX3ea9KeKENBL35N2DpY9KqryAijZSZOKOc0 IuFkklI2yUXT0oU8dDN9dZI4wDmtlBcg5qIm5Z4uUOnKbCHzSbcEph9qt9RMVXW3Uxc1 UKtC3KOaQONRDhakj27f0xeC7pO5IzQqX8ZBbWjwWy2utv1ezCVJ4OPSc9fcUE1Hvmta 0bUsBrFJiYy67vkLP498bJuOweUXrkSDylEgLdxRj/hAHZmYrL2ZhMFOOdGs5dhXjxJT xiLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:delivered-to:sender:list-help :list-post:list-archive:list-subscribe:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=11E5wagt5u/0aqjVSheLjtn+Ngm23i+nGOwNB908VYg=; b=hVb6r6bFlKL+NKR1IZnE6N3xUdv6Un537HTGlCmbG4E1C26HlMK3/qjSOUGUgu7O4k 51Xl6K4Zl7Xmh268KvvXStlDyId+SxspZ0b0du+0FAbZ1g/LQETDHIqsQuq9HjmyitZA b3nSK73lmdZ8bSdbBW2K1G9zQPCJbW+ooUKS+EoEuyiMbw1CTOe88zJFxmDjCrNmS1Fc d+ugeZn9ihh7brgJP2wnH7Wz3eNaJ3he+IuCB2hJZphQe0T18zKZN3f/3D7QRBZx1ekO U697WsQ+MAja9+aL3/lf2MD3OcqmH6nofYpDygX36JIgPuQEYwKoVFDjsx0w1YHd40gW kHoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=jrk0NAiq; spf=pass (google.com: domain of binutils-return-101080-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=binutils-return-101080-patch=linaro.org@sourceware.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id z62si4474570pgd.819.2018.03.22.07.39.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Mar 2018 07:39:34 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-return-101080-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=jrk0NAiq; spf=pass (google.com: domain of binutils-return-101080-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=binutils-return-101080-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=kH7cbIKiHHGDopMKBW2tLsGoiN8vVil/aMd7xYsylJl Q1ZUZUVte8XXGpgYMDVL1MKD9g3BTnZODD748qretiiYp0lfliiMDFdUcu6PfGdF AaM3FdvBbwb+uyUoimypMA/3H/CuXw8tX4zcsGzMUs1VBtmVqNh76kEsRY8/ihpI = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=MlFaAfltJuvXddm3VaQ3WX92W0M=; b=jrk0NAiqQgDHP5uRv mJLWOnJPrirSm5VqUN28AIFrclQ+oXsQpG+2nJHrUhBZHn77bDN/Q9f/8p+7YIyG zzqh5HxJKw+IIAa2Tix9JJ3Ist9s/JiukQaq6tMmWiruINqjNKOQBXmvSIQlGJvh Usdhfwn++bUk7MmNkxcOT/z52E= Received: (qmail 33005 invoked by alias); 22 Mar 2018 14:39:21 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Delivered-To: mailing list binutils@sourceware.org Received: (qmail 32990 invoked by uid 89); 22 Mar 2018 14:39:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=relocating X-HELO: mx07-00178001.pphosted.com Received: from mx07-00178001.pphosted.com (HELO mx07-00178001.pphosted.com) (62.209.51.94) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Mar 2018 14:39:18 +0000 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w2MEdAuU030982 for ; Thu, 22 Mar 2018 15:39:15 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2gvebr80su-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 22 Mar 2018 15:39:15 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 550EC3A for ; Thu, 22 Mar 2018 14:39:15 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node1.st.com [10.75.127.13]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 35CF12AFC for ; Thu, 22 Mar 2018 14:39:15 +0000 (GMT) Received: from gnx2104.gnb.st.com (10.75.127.51) by SFHDAG5NODE1.st.com (10.75.127.13) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 22 Mar 2018 15:39:14 +0100 From: Christophe Lyon To: Subject: [ARM-FDPIC 01/12] [ARM] Add armelf_linux_fdpiceabi and armelfb_linux_fdpiceabi BFD backends Date: Thu, 22 Mar 2018 15:38:19 +0100 Message-ID: <20180322143850.1766-2-christophe.lyon@st.com> In-Reply-To: <20180322143850.1766-1-christophe.lyon@st.com> References: <20180322143850.1766-1-christophe.lyon@st.com> MIME-Version: 1.0 X-ClientProxiedBy: SFHDAG4NODE1.st.com (10.75.127.10) To SFHDAG5NODE1.st.com (10.75.127.13) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-22_07:, , signatures=0 X-IsSubscribed: yes Initial definition of these new backends. 2018-XX-XX Christophe Lyon Mickaël Guêné bfd/ * config.bfd (arm*b-*-linux-*): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec to targ_selvecs. (arm*-*-linux-*): Likewise. * configure.ac: Add support for arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. * configure: Regenerate. * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p. (elf32_arm_link_hash_table_create): Initialize fdpic_p. (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM) (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets. (elf32_arm_fdpic_link_hash_table_create): New. * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. ld/ * Makefile.am (ALL_EMULATION_SOURCES): Add earmelf_linux_fdpiceabi.c and earmelfb_linux_fdpiceabi.c. (earmelf_linux_fdpiceabi.c, earmelfb_linux_fdpiceabi.c): New rules. * Makefile.in: Regenerate. * configure.tgt (arm*b-*-linux-*eabi*): Add armelf_linux_fdpiceabi and armelfb_linux_fdpiceabi. (arm*-*-linux-*eabi*): Likewise. * emulparams/armelf_linux_fdpiceabi.sh: New. * emulparams/armelfb_linux_fdpiceabi.sh: New. --- bfd/config.bfd | 4 +-- bfd/configure | 2 ++ bfd/configure.ac | 2 ++ bfd/elf32-arm.c | 44 ++++++++++++++++++++++++++++++++ bfd/targets.c | 4 +++ ld/Makefile.am | 13 ++++++++++ ld/Makefile.in | 15 +++++++++++ ld/configure.tgt | 4 +-- ld/emulparams/armelf_linux_fdpiceabi.sh | 13 ++++++++++ ld/emulparams/armelfb_linux_fdpiceabi.sh | 2 ++ 10 files changed, 99 insertions(+), 4 deletions(-) create mode 100644 ld/emulparams/armelf_linux_fdpiceabi.sh create mode 100644 ld/emulparams/armelfb_linux_fdpiceabi.sh -- 2.6.3 diff --git a/bfd/config.bfd b/bfd/config.bfd index f04a993..2fe22eb 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -436,7 +436,7 @@ case "${targ}" in ;; armeb-*-elf | arm*b-*-freebsd* | arm*b-*-linux-* | armeb-*-eabi*) targ_defvec=arm_elf32_be_vec - targ_selvecs=arm_elf32_le_vec + targ_selvecs="arm_elf32_fdpic_be_vec arm_elf32_le_vec arm_elf32_fdpic_le_vec" ;; arm-*-kaos*) targ_defvec=arm_elf32_le_vec @@ -446,7 +446,7 @@ case "${targ}" in arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \ arm*-*-eabi* | arm-*-rtems*) targ_defvec=arm_elf32_le_vec - targ_selvecs=arm_elf32_be_vec + targ_selvecs="arm_elf32_fdpic_le_vec arm_elf32_be_vec arm_elf32_fdpic_be_vec" ;; arm*-*-vxworks | arm*-*-windiss) targ_defvec=arm_elf32_vxworks_le_vec diff --git a/bfd/configure b/bfd/configure index d1fe335..a023806 100755 --- a/bfd/configure +++ b/bfd/configure @@ -14355,6 +14355,8 @@ do arm_coff_le_vec) tb="$tb coff-arm.lo $coff" ;; arm_elf32_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; arm_elf32_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; + arm_elf32_fdpic_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; + arm_elf32_fdpic_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; arm_elf32_nacl_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; arm_elf32_nacl_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; arm_elf32_symbian_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; diff --git a/bfd/configure.ac b/bfd/configure.ac index 20e2c02..64df7db 100644 --- a/bfd/configure.ac +++ b/bfd/configure.ac @@ -432,6 +432,8 @@ do arm_coff_le_vec) tb="$tb coff-arm.lo $coff" ;; arm_elf32_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; arm_elf32_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; + arm_elf32_fdpic_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; + arm_elf32_fdpic_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; arm_elf32_nacl_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; arm_elf32_nacl_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; arm_elf32_symbian_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index ce9c2f2..565bb40 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -3228,6 +3228,9 @@ struct elf32_arm_link_hash_table unsigned int bfd_count; unsigned int top_index; asection **input_list; + + /* True if the target system uses FDPIC. */ + int fdpic_p; }; static inline int @@ -3806,6 +3809,7 @@ elf32_arm_link_hash_table_create (bfd *abfd) #endif ret->use_rel = TRUE; ret->obfd = abfd; + ret->fdpic_p = 0; if (!bfd_hash_table_init (&ret->stub_hash_table, stub_hash_newfunc, sizeof (struct elf32_arm_stub_hash_entry))) @@ -19411,6 +19415,46 @@ elf32_arm_nacl_plt_sym_val (bfd_vma i, const asection *plt, #define ELF_COMMONPAGESIZE 0x1000 +/* FDPIC Targets. */ + +#undef TARGET_LITTLE_SYM +#define TARGET_LITTLE_SYM arm_elf32_fdpic_le_vec +#undef TARGET_LITTLE_NAME +#define TARGET_LITTLE_NAME "elf32-littlearm-fdpic" +#undef TARGET_BIG_SYM +#define TARGET_BIG_SYM arm_elf32_fdpic_be_vec +#undef TARGET_BIG_NAME +#define TARGET_BIG_NAME "elf32-bigarm-fdpic" +#undef elf_match_priority +#define elf_match_priority 128 + +/* Like elf32_arm_link_hash_table_create -- but overrides + appropriately for FDPIC. */ + +static struct bfd_link_hash_table * +elf32_arm_fdpic_link_hash_table_create (bfd *abfd) +{ + struct bfd_link_hash_table *ret; + + ret = elf32_arm_link_hash_table_create (abfd); + if (ret) + { + struct elf32_arm_link_hash_table *htab = (struct elf32_arm_link_hash_table *) ret; + + htab->fdpic_p = 1; + } + return ret; +} + +#undef elf32_bed +#define elf32_bed elf32_arm_fdpic_bed + +#undef bfd_elf32_bfd_link_hash_table_create +#define bfd_elf32_bfd_link_hash_table_create elf32_arm_fdpic_link_hash_table_create + +#include "elf32-target.h" +#undef elf_match_priority + /* VxWorks Targets. */ #undef TARGET_LITTLE_SYM diff --git a/bfd/targets.c b/bfd/targets.c index 43102d4..79e3309 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -612,6 +612,8 @@ extern const bfd_target arm_coff_be_vec; extern const bfd_target arm_coff_le_vec; extern const bfd_target arm_elf32_be_vec; extern const bfd_target arm_elf32_le_vec; +extern const bfd_target arm_elf32_fdpic_be_vec; +extern const bfd_target arm_elf32_fdpic_le_vec; extern const bfd_target arm_elf32_nacl_be_vec; extern const bfd_target arm_elf32_nacl_le_vec; extern const bfd_target arm_elf32_symbian_be_vec; @@ -1021,6 +1023,8 @@ static const bfd_target * const _bfd_target_vector[] = &arm_coff_le_vec, &arm_elf32_be_vec, &arm_elf32_le_vec, + &arm_elf32_fdpic_be_vec, + &arm_elf32_fdpic_le_vec, &arm_elf32_symbian_be_vec, &arm_elf32_symbian_le_vec, &arm_elf32_vxworks_be_vec, diff --git a/ld/Makefile.am b/ld/Makefile.am index d94fce7..31ac592 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -176,6 +176,7 @@ ALL_EMULATION_SOURCES = \ earmelf_fuchsia.c \ earmelf_linux.c \ earmelf_linux_eabi.c \ + earmelf_linux_fdpiceabi.c \ earmelf_nacl.c \ earmelf_nbsd.c \ earmelf_phoenix.c \ @@ -185,6 +186,7 @@ ALL_EMULATION_SOURCES = \ earmelfb_fuchsia.c \ earmelfb_linux.c \ earmelfb_linux_eabi.c \ + earmelfb_linux_fdpiceabi.c \ earmelfb_nacl.c \ earmelfb_nbsd.c \ earmnbsd.c \ @@ -780,6 +782,11 @@ earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +earmelf_linux_fdpiceabi.c: $(srcdir)/emulparams/armelf_linux_fdpiceabi.sh \ + $(srcdir)/emulparams/armelf_linux.sh \ + $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + earmelf_nacl.c: $(srcdir)/emulparams/armelf_nacl.sh \ $(srcdir)/emulparams/armelf_linux_eabi.sh \ $(srcdir)/emulparams/armelf_linux.sh \ @@ -826,6 +833,12 @@ earmelfb_linux_eabi.c: $(srcdir)/emulparams/armelfb_linux_eabi.sh \ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +earmelfb_linux_fdpiceabi.c: $(srcdir)/emulparams/armelfb_linux_fdpiceabi.sh \ + $(srcdir)/emulparams/armelfb_linux_fdpiceabi.sh \ + $(srcdir)/emulparams/armelf_linux.sh \ + $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + earmelfb_nacl.c: $(srcdir)/emulparams/armelfb_nacl.sh \ $(srcdir)/emulparams/armelf_nacl.sh \ $(srcdir)/emulparams/armelf_linux_eabi.sh \ diff --git a/ld/Makefile.in b/ld/Makefile.in index 704694b..897a2fb 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -545,6 +545,7 @@ ALL_EMULATION_SOURCES = \ earmelf_fuchsia.c \ earmelf_linux.c \ earmelf_linux_eabi.c \ + earmelf_linux_fdpiceabi.c \ earmelf_nacl.c \ earmelf_nbsd.c \ earmelf_phoenix.c \ @@ -554,6 +555,7 @@ ALL_EMULATION_SOURCES = \ earmelfb_fuchsia.c \ earmelfb_linux.c \ earmelfb_linux_eabi.c \ + earmelfb_linux_fdpiceabi.c \ earmelfb_nacl.c \ earmelfb_nbsd.c \ earmnbsd.c \ @@ -1155,6 +1157,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_fuchsia.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_eabi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_fdpiceabi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nacl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_phoenix.Po@am__quote@ @@ -1164,6 +1167,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_fuchsia.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux_eabi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux_fdpiceabi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nacl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnbsd.Po@am__quote@ @@ -2344,6 +2348,11 @@ earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +earmelf_linux_fdpiceabi.c: $(srcdir)/emulparams/armelf_linux_fdpiceabi.sh \ + $(srcdir)/emulparams/armelf_linux.sh \ + $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + earmelf_nacl.c: $(srcdir)/emulparams/armelf_nacl.sh \ $(srcdir)/emulparams/armelf_linux_eabi.sh \ $(srcdir)/emulparams/armelf_linux.sh \ @@ -2390,6 +2399,12 @@ earmelfb_linux_eabi.c: $(srcdir)/emulparams/armelfb_linux_eabi.sh \ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +earmelfb_linux_fdpiceabi.c: $(srcdir)/emulparams/armelfb_linux_fdpiceabi.sh \ + $(srcdir)/emulparams/armelf_linux_fdpiceabi.sh \ + $(srcdir)/emulparams/armelf_linux.sh \ + $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + earmelfb_nacl.c: $(srcdir)/emulparams/armelfb_nacl.sh \ $(srcdir)/emulparams/armelf_nacl.sh \ $(srcdir)/emulparams/armelf_linux_eabi.sh \ diff --git a/ld/configure.tgt b/ld/configure.tgt index 7897448..ea2aff8 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -129,7 +129,7 @@ arm*-*-symbianelf*) targ_emul=armsymbian;; arm-*-kaos*) targ_emul=armelf ;; arm9e-*-elf) targ_emul=armelf ;; arm*b-*-linux-*eabi*) targ_emul=armelfb_linux_eabi - targ_extra_emuls=armelf_linux_eabi + targ_extra_emuls="armelf_linux_eabi armelf_linux_fdpiceabi armelfb_linux_fdpiceabi" targ_extra_libpath=$targ_extra_emuls ;; arm*b-*-linux-*) targ_emul=armelfb_linux @@ -137,7 +137,7 @@ arm*b-*-linux-*) targ_emul=armelfb_linux targ_extra_libpath="armelf_linux" ;; arm*-*-linux-*eabi*) targ_emul=armelf_linux_eabi - targ_extra_emuls=armelfb_linux_eabi + targ_extra_emuls="armelfb_linux_eabi armelf_linux_fdpiceabi armelfb_linux_fdpiceabi" targ_extra_libpath=$targ_extra_emuls ;; arm*-*-linux-*) targ_emul=armelf_linux diff --git a/ld/emulparams/armelf_linux_fdpiceabi.sh b/ld/emulparams/armelf_linux_fdpiceabi.sh new file mode 100644 index 0000000..104cf38 --- /dev/null +++ b/ld/emulparams/armelf_linux_fdpiceabi.sh @@ -0,0 +1,13 @@ +. ${srcdir}/emulparams/armelf_linux.sh + +OUTPUT_FORMAT="elf32-littlearm-fdpic" +BIG_OUTPUT_FORMAT="elf32-bigarm-fdpic" +LITTLE_OUTPUT_FORMAT="elf32-littlearm-fdpic" + +# Use the ARM ABI-compliant exception-handling sections. +OTHER_READONLY_SECTIONS=" + .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) } + ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); } + .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) } + ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }" + diff --git a/ld/emulparams/armelfb_linux_fdpiceabi.sh b/ld/emulparams/armelfb_linux_fdpiceabi.sh new file mode 100644 index 0000000..988ea7a --- /dev/null +++ b/ld/emulparams/armelfb_linux_fdpiceabi.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/armelf_linux_fdpiceabi.sh +OUTPUT_FORMAT="elf32-bigarm-fdpic"