[2/3] libgloss: arc: Add _link stub for nSIM

Message ID 20260312225330.2903392-3-ykolerov@synopsys.com
State New
Headers
Series A series of fixes for ARC Classic |

Commit Message

Yuriy Kolerov March 12, 2026, 10:53 p.m. UTC
  Building of C++ applications may fail without this stub if
libraries are not built with -ffunction-sections.

Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
---
 libgloss/arc/nsim-syscalls.c | 7 +++++++
 1 file changed, 7 insertions(+)
  

Patch

diff --git a/libgloss/arc/nsim-syscalls.c b/libgloss/arc/nsim-syscalls.c
index 65ad3e009..5e754799c 100644
--- a/libgloss/arc/nsim-syscalls.c
+++ b/libgloss/arc/nsim-syscalls.c
@@ -233,6 +233,13 @@  _clock (void)
     return -1;
 }
 
+int
+_link (const char *old_name, const char *new_name)
+{
+  errno = ENOSYS;
+  return -1;
+}
+
 /* Some system calls are implemented in nSIM hostlink, but are available only
    on Linux hosts.  To minimize potential compatibility issues they are by
    default disabled in libgloss build.  */