From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2134) id 6A4403858D26; Wed, 22 May 2024 18:27:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A4403858D26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1716402449; bh=WFcXIJhAFr0xAXy2Gk//FeeNPARlghrM5ImpYYWQvbg=; h=From:To:Subject:Date:From; b=xnaJ15ORjPEjKuRVLPRiOGC8dGTdcbup21AvCxlN6SsSiNtluaJ006j4YDfWUxs2p agQTeZeuCBLv7jzfi6QYtqt9r4ORAi2DdrT+Fo1wbmRiZ0u8dc0zkKvzcrXV4aeexB cLUZL4N0tCPOB7WAodd5Qb8XXrNbbKeZTvIJB91g= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jeff Johnston To: newlib-cvs@sourceware.org Subject: [newlib-cygwin/main] arc: libgloss: Use long calls attribute for exit_halt X-Act-Checkin: newlib-cygwin X-Git-Author: Claudiu Zissulescu X-Git-Refname: refs/heads/main X-Git-Oldrev: 7d386b6dac5e958d5301daa9b32f0c979ef4030f X-Git-Newrev: f84fed52916dae4d297f3a9b6b607cd6a1ed3ede Message-Id: <20240522182729.6A4403858D26@sourceware.org> Date: Wed, 22 May 2024 18:27:29 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Df84fed52916= dae4d297f3a9b6b607cd6a1ed3ede commit f84fed52916dae4d297f3a9b6b607cd6a1ed3ede Author: Claudiu Zissulescu Date: Tue May 21 10:56:44 2024 +0100 arc: libgloss: Use long calls attribute for exit_halt =20 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. =20 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. =20 Signed-off-by: Claudiu Zissulescu 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. =20 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) } =20 /* Should be provided by crt0.S. */ -extern void __attribute__((noreturn)) _exit_halt (); +extern void __attribute__((noreturn, long_call)) _exit_halt (); =20 void __attribute__((noreturn))