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>
This commit is contained in:
Claudiu Zissulescu 2024-05-21 10:56:44 +01:00 committed by Jeff Johnston
parent 7d386b6dac
commit f84fed5291
1 changed files with 2 additions and 2 deletions

View File

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