From 3dbaad0a1f27b96462541e1189efe37ffa913e9a Mon Sep 17 00:00:00 2001 From: Albert Ou Date: Tue, 13 Dec 2016 15:05:19 -0800 Subject: Refactor libc stubs into libwrap The --wrap feature of GNU ld supports a cleaner framework for linking in alternative implementations of libc functions without cpp hacks. Place wrappers in separate object files to reduce static code size. --- bsp/libwrap/sys/stub.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 bsp/libwrap/sys/stub.h (limited to 'bsp/libwrap/sys/stub.h') diff --git a/bsp/libwrap/sys/stub.h b/bsp/libwrap/sys/stub.h new file mode 100644 index 0000000..fb5e5be --- /dev/null +++ b/bsp/libwrap/sys/stub.h @@ -0,0 +1,10 @@ +/* See LICENSE of license details. */ +#ifndef _SIFIVE_SYS_STUB_H +#define _SIFIVE_SYS_STUB_H + +static inline int _stub(int err) +{ + return -1; +} + +#endif /* _SIFIVE_SYS_STUB_H */ -- cgit v1.2.1-18-gbd029