public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: newlib@sourceware.org
Cc: nd@arm.com, Alexander Fedotov <alfedotov@gmail.com>
Subject: Re: [AArch64] use stack symbol provided by linker for nosys
Date: Thu, 17 Aug 2017 11:52:00 -0000	[thread overview]
Message-ID: <59957803.303@arm.com> (raw)
In-Reply-To: <5994475B.8020500@arm.com>

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

On 16/08/17 14:23, Szabolcs Nagy wrote:
> now the aarch64-none-elf toolchain builds but all
> of our execution tests fail, because __call_exitprocs
> eventually calls the 0x1 address.
> 
> i think this patch should be reverted or somebody
> has to figure out what's going on (and test it
> at least in qemu-user with the rdimon.specs before
> committing it)
> 

please apply the attached patch.


[-- Attachment #2: 0001-AArch64-Fix-crt0-init-fini-code.patch --]
[-- Type: text/x-patch, Size: 1139 bytes --]

From 703640745903f25341c2b1d8385ce6ae799ef4c8 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Thu, 17 Aug 2017 11:42:59 +0100
Subject: [PATCH] [AArch64] Fix crt0 init fini code

__USES_INITFINI__ ifdef was incorrectly copied from arm
(it's an arm backend thing in gcc, not meaningful on aarch64)
---
 libgloss/aarch64/crt0.S | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/libgloss/aarch64/crt0.S b/libgloss/aarch64/crt0.S
index cc7e84ddf..4ad435e03 100644
--- a/libgloss/aarch64/crt0.S
+++ b/libgloss/aarch64/crt0.S
@@ -153,12 +153,10 @@
 	bl	FUNCTION (initialise_monitor_handles)
 #endif
 
-#ifdef __USES_INITFINI__
 	/* .init and .fini sections are used to create constructors
 	   and destructors.  Here we call the _init function and arrange
 	   for _fini to be called at program exit.  */
 	ldr	x0, .Lfini
-#endif
 	bl	FUNCTION (atexit)
 
 	bl	FUNCTION (_init)
@@ -256,10 +254,8 @@ FUNCTION (_cpu_init_hook):
 	GEN_DWORD __bss_start__
 .LC2:
 	GEN_DWORD __bss_end__
-#ifdef __USES_INITFINI__
 .Lfini:
 	GEN_DWORD FUNCTION(_fini)
-#endif
 #ifdef ARM_RDI_MONITOR
 .Lenvp:
 	GEN_DWORD env
-- 
2.11.0


  reply	other threads:[~2017-08-17 11:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-11 13:55 Alexander Fedotov
2017-08-14  8:21 ` Corinna Vinschen
2017-08-15 12:47 ` Szabolcs Nagy
2017-08-15 13:35   ` Tamar Christina
2017-08-15 13:57     ` Alexander Fedotov
2017-08-15 14:06       ` Tamar Christina
2017-08-15 14:20         ` Alexander Fedotov
2017-08-15 15:55           ` Corinna Vinschen
2017-08-16 22:07             ` Szabolcs Nagy
2017-08-17 11:52               ` Szabolcs Nagy [this message]
2017-08-17 11:54                 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59957803.303@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=alfedotov@gmail.com \
    --cc=nd@arm.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).