Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss/nds32/_link.S')
-rw-r--r--libgloss/nds32/_link.S23
1 files changed, 16 insertions, 7 deletions
diff --git a/libgloss/nds32/_link.S b/libgloss/nds32/_link.S
index 15016fcc1..7f6b7f0fa 100644
--- a/libgloss/nds32/_link.S
+++ b/libgloss/nds32/_link.S
@@ -27,10 +27,19 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef __NDS32_VH__
-
-#include "../syscall.h"
-#include "syscall_extra.h"
-SYS_WRAPPER _link, SYS_link
-
-#endif /* not __NDS32_VH__ */
+/* Upon successful completion, 0 shall be returned. Otherwise,
+ -1 shall be returned and errno set to indicate the error. */
+ .extern _impure_ptr /* The first element is _errno. */
+ .text
+ .global _link
+ .type _link, @function
+ .align 2
+_link:
+ /* A minimal implementation has no file system, so this function
+ must always fail, with an appropriate value set in errno. */
+ movi $r0, #31 /* EMLINK: Too many links */
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15]
+ movi $r0, -1 /* Set return value to -1. */
+ ret
+ .size _link, .-_link