Unbreak ptrace on x86_64
authorAggelos Economopoulos <aoiko@cc.ece.ntua.gr>
Tue, 1 Dec 2009 12:46:09 +0000 (14:46 +0200)
committerAggelos Economopoulos <aoiko@cc.ece.ntua.gr>
Tue, 1 Dec 2009 12:46:09 +0000 (14:46 +0200)
commit95a5b34936ae88313dea47593a1e7033561ca997
tree8e363bfbda36eef2377672b354a1dcb6ef6b6e08
parentbf222daec36efb3cc9df9d6f793058b11fe6d145
Unbreak ptrace on x86_64

The asm code was calling __tls_get_addr in order to set errno to 0
before the system call and that was trashing registers holding the
syscall arguments. Don't bother setting errno to 0 anymore (the
in-tree users are careful to set that themselves when appropriate).
While here, declare it properly as a weak symbol. At this point we
could just drop the hand-written assembly.

Proxies-to-x86_64-dfly: Antonio Huete Jimenez, Jan Lentfer
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1571
lib/libc/x86_64/sys/ptrace.S