This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [AArch64] use stack symbol provided by linker for nosys
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Alexander Fedotov <alfedotov at gmail dot com>, newlib at sourceware dot org
- Cc: nd at arm dot com
- Date: Tue, 15 Aug 2017 10:53:17 +0100
- Subject: Re: [AArch64] use stack symbol provided by linker for nosys
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <CAN8C2CqMiUz+oEvj83E6ZimN1d9UxX5WxrpiaqxC-geK9HTtkQ@mail.gmail.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 11/08/17 14:55, Alexander Fedotov wrote:
> Use the same approach for stack setup as for ARM when nosys is used.
>
> Comments are appreciated.
>
> Alex
>
>
> aarch64_nosys_stack.patch
>
>
> From c049b628de5cd706721a57fa735c475bcde4ee5f Mon Sep 17 00:00:00 2001
> From: Alexander Fedotov-B55613 <b55613@freescale.com>
> Date: Fri, 11 Aug 2017 16:47:02 +0300
> Subject: [PATCH] use stack from linker script when nosys
>
this broke the build
aarch64-none-elf/lib/rdimon-crt0.o: In function `_start':
S/newlib-cygwin/libgloss/aarch64/crt0.S:90: undefined reference to `.LC0'
S/newlib-cygwin/libgloss/aarch64/crt0.S:90:(.text+0x0): relocation truncated to fit: R_AARCH64_ADR_PREL_LO21
against undefined symbol `.LC0'
S/newlib-cygwin/libgloss/aarch64/crt0.S:102: undefined reference to `.LC0'
S/newlib-cygwin/libgloss/aarch64/crt0.S:102:(.text+0xc): relocation truncated to fit: R_AARCH64_LD_PREL_LO19
against undefined symbol `.LC0'
collect2: error: ld returned 1 exit status
> ---
> libgloss/aarch64/crt0.S | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/libgloss/aarch64/crt0.S b/libgloss/aarch64/crt0.S
> index 3bf0278..0c669d9 100644
> --- a/libgloss/aarch64/crt0.S
> +++ b/libgloss/aarch64/crt0.S
> @@ -83,7 +83,7 @@
> FUNC_START _start
>
> /* Start by setting up a stack */
> -
> +#ifdef ARM_RDI_MONITOR
i think this should match
...
> +#ifdef ARM_RDP_MONITOR
this.
> .LC0:
> GEN_DWORD HeapBase