Use hidden visibility for generated stubs whose names begin with underscores.
Change-Id: Idb39fd04b7a14114801624e744e76e0e7913d951
This commit is contained in:
parent
9728854992
commit
fff6e272e9
@ -16,3 +16,4 @@ ENTRY(__arch_prctl)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__arch_prctl)
|
END(__arch_prctl)
|
||||||
|
.hidden _C_LABEL(__arch_prctl)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__brk)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__brk)
|
END(__brk)
|
||||||
|
.hidden _C_LABEL(__brk)
|
||||||
|
@ -17,3 +17,4 @@ ENTRY(__clone)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__clone)
|
END(__clone)
|
||||||
|
.hidden _C_LABEL(__clone)
|
||||||
|
@ -17,3 +17,4 @@ ENTRY(__epoll_pwait)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__epoll_pwait)
|
END(__epoll_pwait)
|
||||||
|
.hidden _C_LABEL(__epoll_pwait)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__getcpu)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__getcpu)
|
END(__getcpu)
|
||||||
|
.hidden _C_LABEL(__getcpu)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__getcwd)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__getcwd)
|
END(__getcwd)
|
||||||
|
.hidden _C_LABEL(__getcwd)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__getpriority)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__getpriority)
|
END(__getpriority)
|
||||||
|
.hidden _C_LABEL(__getpriority)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__ioctl)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__ioctl)
|
END(__ioctl)
|
||||||
|
.hidden _C_LABEL(__ioctl)
|
||||||
|
@ -17,3 +17,4 @@ ENTRY(__openat)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__openat)
|
END(__openat)
|
||||||
|
.hidden _C_LABEL(__openat)
|
||||||
|
@ -17,3 +17,4 @@ ENTRY(__ppoll)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__ppoll)
|
END(__ppoll)
|
||||||
|
.hidden _C_LABEL(__ppoll)
|
||||||
|
@ -17,3 +17,4 @@ ENTRY(__pselect6)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__pselect6)
|
END(__pselect6)
|
||||||
|
.hidden _C_LABEL(__pselect6)
|
||||||
|
@ -17,3 +17,4 @@ ENTRY(__ptrace)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__ptrace)
|
END(__ptrace)
|
||||||
|
.hidden _C_LABEL(__ptrace)
|
||||||
|
@ -17,3 +17,4 @@ ENTRY(__reboot)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__reboot)
|
END(__reboot)
|
||||||
|
.hidden _C_LABEL(__reboot)
|
||||||
|
@ -17,3 +17,4 @@ ENTRY(__rt_sigaction)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__rt_sigaction)
|
END(__rt_sigaction)
|
||||||
|
.hidden _C_LABEL(__rt_sigaction)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__rt_sigpending)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__rt_sigpending)
|
END(__rt_sigpending)
|
||||||
|
.hidden _C_LABEL(__rt_sigpending)
|
||||||
|
@ -17,3 +17,4 @@ ENTRY(__rt_sigprocmask)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__rt_sigprocmask)
|
END(__rt_sigprocmask)
|
||||||
|
.hidden _C_LABEL(__rt_sigprocmask)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__rt_sigsuspend)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__rt_sigsuspend)
|
END(__rt_sigsuspend)
|
||||||
|
.hidden _C_LABEL(__rt_sigsuspend)
|
||||||
|
@ -17,3 +17,4 @@ ENTRY(__rt_sigtimedwait)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__rt_sigtimedwait)
|
END(__rt_sigtimedwait)
|
||||||
|
.hidden _C_LABEL(__rt_sigtimedwait)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__sched_getaffinity)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__sched_getaffinity)
|
END(__sched_getaffinity)
|
||||||
|
.hidden _C_LABEL(__sched_getaffinity)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__syslog)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__syslog)
|
END(__syslog)
|
||||||
|
.hidden _C_LABEL(__syslog)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__timer_create)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__timer_create)
|
END(__timer_create)
|
||||||
|
.hidden _C_LABEL(__timer_create)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__timer_delete)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__timer_delete)
|
END(__timer_delete)
|
||||||
|
.hidden _C_LABEL(__timer_delete)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__timer_getoverrun)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__timer_getoverrun)
|
END(__timer_getoverrun)
|
||||||
|
.hidden _C_LABEL(__timer_getoverrun)
|
||||||
|
@ -16,3 +16,4 @@ ENTRY(__timer_gettime)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__timer_gettime)
|
END(__timer_gettime)
|
||||||
|
.hidden _C_LABEL(__timer_gettime)
|
||||||
|
@ -17,3 +17,4 @@ ENTRY(__timer_settime)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__timer_settime)
|
END(__timer_settime)
|
||||||
|
.hidden _C_LABEL(__timer_settime)
|
||||||
|
@ -17,3 +17,4 @@ ENTRY(__waitid)
|
|||||||
1:
|
1:
|
||||||
ret
|
ret
|
||||||
END(__waitid)
|
END(__waitid)
|
||||||
|
.hidden _C_LABEL(__waitid)
|
||||||
|
@ -233,10 +233,17 @@ def make__NR_name(name):
|
|||||||
return "__NR_%s" % (name)
|
return "__NR_%s" % (name)
|
||||||
|
|
||||||
|
|
||||||
def add_aliases(stub, syscall):
|
def add_footer(pointer_length, stub, syscall):
|
||||||
|
# Add any aliases for this syscall.
|
||||||
aliases = syscall["aliases"]
|
aliases = syscall["aliases"]
|
||||||
for alias in aliases:
|
for alias in aliases:
|
||||||
stub += function_alias % { "func" : syscall["func"], "alias" : alias }
|
stub += function_alias % { "func" : syscall["func"], "alias" : alias }
|
||||||
|
|
||||||
|
# Use hidden visibility for any functions beginning with underscores.
|
||||||
|
# TODO: clean up single-underscore names too.
|
||||||
|
if pointer_length == 64 and syscall["func"].startswith("__"):
|
||||||
|
stub += '.hidden _C_LABEL(' + syscall["func"] + ')\n'
|
||||||
|
|
||||||
return stub
|
return stub
|
||||||
|
|
||||||
|
|
||||||
@ -334,22 +341,22 @@ class State:
|
|||||||
syscall["__NR_name"] = make__NR_name(syscall["name"])
|
syscall["__NR_name"] = make__NR_name(syscall["name"])
|
||||||
|
|
||||||
if syscall.has_key("arm"):
|
if syscall.has_key("arm"):
|
||||||
syscall["asm-arm"] = add_aliases(arm_eabi_genstub(syscall), syscall)
|
syscall["asm-arm"] = add_footer(32, arm_eabi_genstub(syscall), syscall)
|
||||||
|
|
||||||
if syscall.has_key("x86"):
|
if syscall.has_key("x86"):
|
||||||
if syscall["socketcall_id"] >= 0:
|
if syscall["socketcall_id"] >= 0:
|
||||||
syscall["asm-x86"] = add_aliases(x86_genstub_socketcall(syscall), syscall)
|
syscall["asm-x86"] = add_footer(32, x86_genstub_socketcall(syscall), syscall)
|
||||||
else:
|
else:
|
||||||
syscall["asm-x86"] = add_aliases(x86_genstub(syscall), syscall)
|
syscall["asm-x86"] = add_footer(32, x86_genstub(syscall), syscall)
|
||||||
elif syscall["socketcall_id"] >= 0:
|
elif syscall["socketcall_id"] >= 0:
|
||||||
E("socketcall_id for dispatch syscalls is only supported for x86 in '%s'" % t)
|
E("socketcall_id for dispatch syscalls is only supported for x86 in '%s'" % t)
|
||||||
return
|
return
|
||||||
|
|
||||||
if syscall.has_key("mips"):
|
if syscall.has_key("mips"):
|
||||||
syscall["asm-mips"] = add_aliases(mips_genstub(syscall), syscall)
|
syscall["asm-mips"] = add_footer(32, mips_genstub(syscall), syscall)
|
||||||
|
|
||||||
if syscall.has_key("x86_64"):
|
if syscall.has_key("x86_64"):
|
||||||
syscall["asm-x86_64"] = add_aliases(x86_64_genstub(syscall), syscall)
|
syscall["asm-x86_64"] = add_footer(64, x86_64_genstub(syscall), syscall)
|
||||||
|
|
||||||
|
|
||||||
# Scan a Linux kernel asm/unistd.h file containing __NR_* constants
|
# Scan a Linux kernel asm/unistd.h file containing __NR_* constants
|
||||||
|
Loading…
Reference in New Issue
Block a user