diff options
author | jake <jake@FreeBSD.org> | 2001-11-18 04:29:20 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2001-11-18 04:29:20 +0000 |
commit | d7cd5a1a91a0675a8e0a851fc6ba200b2f21d50c (patch) | |
tree | 31d8f595f0e5ac44b7ee343d835d68da26f8cc69 /lib | |
parent | bb775f0c6977471676bb4139024f7c212b7f79b6 (diff) | |
download | FreeBSD-src-d7cd5a1a91a0675a8e0a851fc6ba200b2f21d50c.zip FreeBSD-src-d7cd5a1a91a0675a8e0a851fc6ba200b2f21d50c.tar.gz |
Add .type and .size pseudo-ops to system call macros so that dynamic binaries
will link. They must be used for weak symbols as well as strong ones.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sparc64/SYS.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/libc/sparc64/SYS.h b/lib/libc/sparc64/SYS.h index cc9c844..6a8fa16 100644 --- a/lib/libc/sparc64/SYS.h +++ b/lib/libc/sparc64/SYS.h @@ -51,10 +51,17 @@ #define _SYSENTRY(x) \ ENTRY(__CONCAT(__sys_,x)) ; \ .weak CNAME(x) ; \ + .type CNAME(x),@function ; \ .set CNAME(x),CNAME(__CONCAT(__sys_,x)) ; \ .weak CNAME(__CONCAT(_,x)) ; \ + .type CNAME(__CONCAT(_,x)), @function ; \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)) +#define _SYSEND(x) \ + .size CNAME(__CONCAT(__sys_,x)), . - CNAME(__CONCAT(__sys_,x)) ; \ + .size CNAME(__CONCAT(_,x)), . - CNAME(__CONCAT(__sys_,x)) ; \ + .size CNAME(__CONCAT(,x)), . - CNAME(__CONCAT(__sys_,x)) + #define _SYSCALL(x) \ mov __CONCAT(SYS_,x), %g1 ; \ ta %xcc, ST_SYSCALL ; \ @@ -63,20 +70,21 @@ ENTRY(__CONCAT(__sys_,x)) ; \ ERROR() ; \ 1: -#define SYSCALL(x) \ -_SYSENTRY(x) ; \ - _SYSCALL(x) - #define RSYSCALL(x) \ - SYSCALL(x) ; \ +_SYSENTRY(x) ; \ + _SYSCALL(x) ; \ retl ; \ - nop + nop ; \ + _SYSEND(x) #define PSEUDO(x) \ ENTRY(__CONCAT(__sys_,x)) ; \ .weak CNAME(__CONCAT(_,x)) ; \ + .type CNAME(__CONCAT(_,x)),@function ; \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)) ; \ mov __CONCAT(SYS_,x), %g1 ; \ ta %xcc, ST_SYSCALL ; \ retl ; \ - nop + nop ; \ + .size CNAME(__CONCAT(__sys_,x)), . - CNAME(__CONCAT(__sys_,x)) ; \ + .size CNAME(__CONCAT(_,x)), . - CNAME(__CONCAT(__sys_,x)) |