This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH] [libgloss][AArch64] Fix link when nosys.specs is used to link
- From: Tamar Christina <Tamar dot Christina at arm dot com>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Cc: nd <nd at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, "Marcus Shawcroft" <Marcus dot Shawcroft at arm dot com>
- Date: Thu, 13 Jul 2017 10:52:42 +0000
- Subject: [PATCH] [libgloss][AArch64] Fix link when nosys.specs is used to link
- Authentication-results: sourceware.org; auth=none
- Authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi All,
This patch fixes the issue where nosys.specs is used to link.
e.g. The use of crt0 without any support for semihosting requested.
The AArch64 crt0 was missing an #ifdef for the initialise_monitor_handles
which was causing the link to fail. Sorry for missing this before.
Ok for master?
PS. I don't have commit access so if OK can someone apply?
Thanks,
Tamar
diff --git a/libgloss/aarch64/crt0.S b/libgloss/aarch64/crt0.S
index ed4dafcb10f0b1cc999d50926c49065285c61658..cbff11a4920c92a9155fc60a14d0693cce5e38ff 100644
--- a/libgloss/aarch64/crt0.S
+++ b/libgloss/aarch64/crt0.S
@@ -144,8 +144,10 @@
sub x2, x2, x0 /* Third arg: length of block */
bl FUNCTION (memset)
+#ifdef ARM_RDI_MONITOR
/* Need to set up standard file handles */
bl FUNCTION (initialise_monitor_handles)
+#endif
/* .init and .fini sections are used to create constructors
and destructors. Here we call the _init function and arrange