public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] arc: libgloss: Use long calls attribute for exit_halt
@ 2024-05-22 18:27 Jeff Johnston
  0 siblings, 0 replies; only message in thread
From: Jeff Johnston @ 2024-05-22 18:27 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=f84fed52916dae4d297f3a9b6b607cd6a1ed3ede

commit f84fed52916dae4d297f3a9b6b607cd6a1ed3ede
Author: Claudiu Zissulescu <claziss@gmail.com>
Date:   Tue May 21 10:56:44 2024 +0100

    arc: libgloss: Use long calls attribute for exit_halt
    
    According to GCC documentation for ARC, a function marked with
    the long_call attribute is always called using register-indirect
    jump-and-link instructions, thereby enabling the called function
    to be placed anywhere within the 32-bit address space.
    
    exit_halt function is provided by crt0.S and it's used
    in nsim-syscalls.c. Thus, we want to ensure that a linkage
    issue will not arise.
    
    Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>

Diff:
---
 libgloss/arc/nsim-syscalls.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgloss/arc/nsim-syscalls.c b/libgloss/arc/nsim-syscalls.c
index 7dd0af10f..d299f8cdc 100644
--- a/libgloss/arc/nsim-syscalls.c
+++ b/libgloss/arc/nsim-syscalls.c
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2015, Synopsys, Inc. All rights reserved.
+   Copyright (c) 2015-2024, Synopsys, Inc. All rights reserved.
 
    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions are met:
@@ -100,7 +100,7 @@ _open (const char * pathname, int flags, int mode)
 }
 
 /* Should be provided by crt0.S.  */
-extern void __attribute__((noreturn)) _exit_halt ();
+extern void __attribute__((noreturn, long_call)) _exit_halt ();
 
 void
 __attribute__((noreturn))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-22 18:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-22 18:27 [newlib-cygwin/main] arc: libgloss: Use long calls attribute for exit_halt Jeff Johnston

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).