From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 527633858C53 for ; Fri, 30 Dec 2022 02:40:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 527633858C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=harmstone.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x333.google.com with SMTP id z8-20020a05600c220800b003d33b0bda11so12188518wml.0 for ; Thu, 29 Dec 2022 18:40:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=kFofZKECI58RB5OyhfSxavCPT0U7sM+pGDVtDN6NM0U=; b=Dk9WeunMJ2sD6vlhn5/e1CnCeHrXYqrvBsS3d/hBKj0OQlcfgW2+TEfMagj8RDpctk gJwd6BKLzDZGw/UGJFyAyh7rw02/prk2kxIDsN8w7RgVdcRxndebt3mYr7SydjhiYvB5 3hUbFz4jXpmuScIzfU7bRzxxHjEZAUHWtTUEnOt/RacDerKz2P4GFaVO+4c3rWmx7dcs T0Ov8+9Zm7PY2RK6p1jHklp+6EPhfWHzpn9S/iefbaEOlqPClFjar6nqIp8Q5fdv7FQ7 QmP9DQdUIIK0fn2qPZ2kBP0ssDinRCqjLbUVuw1A+XSFtqPZjsYbHUK0Wvqy2FBRkgWY pxIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kFofZKECI58RB5OyhfSxavCPT0U7sM+pGDVtDN6NM0U=; b=gsK6izaC7AO/BP0S3diDYxcyMSoFhbI+X1pEC2F9O6HHGCz3V5rIrU+K0zYBrPNnAE 7cnu93diejCiEcDaqw39gTs1Ly+1D9TCipmw6JROW520xdcjn6Rd+3fQqGbgTaGcccjS Dx09eNxQ3qN/nDYZ3Qkzuk3F2TbO1DlMIZAbVbVsupTGifAJNGNsZNa3M909YEXJelep pdBx0Ik5Q0e4cYIhlc6N/rlXSDlCcFGu3RdieLCAn2MaewdBqt+2zv0WNVpz/0M+S7oS VKfmGJ8tgMlXvcy4GtUeg389hj8JVebPe/CN7f+TipisCfkcNXAmLWhE6Nrr7KyoUoVs Nu9g== X-Gm-Message-State: AFqh2krleU8LNF0tF1dDqJSCYHPvSlPyttYhBcxOBN/VJQv7yZAKKTsM wHajLKUO/PmyfOV+hbBStJc= X-Google-Smtp-Source: AMrXdXtWoOG2gPsa19DIFbcGKggh+0EM+Cw84OSWMrhsSn0OxoAvrNDaR+cF1X3bcFi8pNm5o+Lftg== X-Received: by 2002:a05:600c:4c21:b0:3cf:f18b:327e with SMTP id d33-20020a05600c4c2100b003cff18b327emr21986902wmp.4.1672368058032; Thu, 29 Dec 2022 18:40:58 -0800 (PST) Received: from beren.harmstone.com ([2a02:8010:64ea:0:8eb8:7eff:fe53:9d5f]) by smtp.gmail.com with ESMTPSA id t17-20020a05600c199100b003d99da8d30asm3726287wmq.46.2022.12.29.18.40.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 18:40:57 -0800 (PST) Sender: Mark Harmstone From: Mark Harmstone To: wej22007@outlook.com, zac.walker@linaro.org, tamar.christina@arm.com, binutils@sourceware.org Cc: Mark Harmstone Subject: [PATCH 1/8] ld: Rename aarch64pe emulation target to arm64pe Date: Fri, 30 Dec 2022 02:40:48 +0000 Message-Id: <20221230024055.31841-1-mark@harmstone.com> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: The second version of my aarch64-w64-mingw32 patches. With this, I'm now able to compile a workable version of GCC, including the CRT (before it was EFI-only). Changes from last time: * The aarch64pe emulation target is renamed to arm64pe. This is the name that LLVM is already using, even though as a rule we call this arch aarch64. Without this clang won't work with ld. Another possibility would be to change the -m parameter if it's "arm64", but that seems to me like it's making things more complicated than they need to be. * The PE big-obj test is split into a separate patch, as per Jan's request * Added support for BFD_RELOC_AARCH64_LDST128_LO12 relocations * Relocations against absolute sections now work * Added error for IMAGE_REL_ARM64_PAGEOFFSET_12L truncation * Added pdb_vec to aarch64-w64-mingw32, now that it's complete * Restored tc_pe_dwarf2_emit_offset in tc-aarch64.c, which is needed to make sure that DWARF offsets are encoded correctly (they're secrels in COFF). There were remnants of this there before, but they were removed by Jedidiah's original patch - presumably because we didn't yet have .secrel32. Mark --- ld/Makefile.am | 4 ++-- ld/Makefile.in | 6 +++--- ld/configure.tgt | 2 +- ld/emulparams/{aarch64pe.sh => arm64pe.sh} | 0 ld/emultempl/pep.em | 4 ++-- ld/po/BLD-POTFILES.in | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) rename ld/emulparams/{aarch64pe.sh => arm64pe.sh} (100%) diff --git a/ld/Makefile.am b/ld/Makefile.am index 65fef4e1690..b066b9d7323 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -388,7 +388,7 @@ ALL_64_EMULATION_SOURCES = \ eaarch64linux32.c \ eaarch64linux32b.c \ eaarch64linuxb.c \ - eaarch64pe.c \ + earm64pe.c \ eelf32_x86_64.c \ eelf32b4300.c \ eelf32bmip.c \ @@ -879,7 +879,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS) @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Pc@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Pc@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linuxb.Pc@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64pe.Pc@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earm64pe.Pc@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_x86_64.Pc@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32b4300.Pc@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32bmip.Pc@am__quote@ diff --git a/ld/Makefile.in b/ld/Makefile.in index ff4c916c27b..edbdd06c705 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -888,7 +888,7 @@ ALL_64_EMULATION_SOURCES = \ eaarch64linux32.c \ eaarch64linux32b.c \ eaarch64linuxb.c \ - eaarch64pe.c \ + earm64pe.c \ eelf32_x86_64.c \ eelf32b4300.c \ eelf32bmip.c \ @@ -1264,7 +1264,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linuxb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64pe.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earm64pe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5ppc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaix5rs6.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaixppc.Po@am__quote@ @@ -2553,7 +2553,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS) @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Pc@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Pc@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linuxb.Pc@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64pe.Pc@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earm64pe.Pc@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_x86_64.Pc@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32b4300.Pc@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32bmip.Pc@am__quote@ diff --git a/ld/configure.tgt b/ld/configure.tgt index 741b246f67e..6b833f26248 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -119,7 +119,7 @@ aarch64-*-haiku*) targ_emul=aarch64haiku targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb armelf_haiku $targ_extra_libpath" ;; aarch64-*-pe*) - targ_emul=aarch64pe + targ_emul=arm64pe targ_extra_ofiles="deffilep.o pep-dll-aarch64.o" ;; alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) diff --git a/ld/emulparams/aarch64pe.sh b/ld/emulparams/arm64pe.sh similarity index 100% rename from ld/emulparams/aarch64pe.sh rename to ld/emulparams/arm64pe.sh diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index e2c538e6d99..e20339fa874 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -48,7 +48,7 @@ fragment <