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:
|
||||
ret
|
||||
END(__arch_prctl)
|
||||
.hidden _C_LABEL(__arch_prctl)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__brk)
|
||||
1:
|
||||
ret
|
||||
END(__brk)
|
||||
.hidden _C_LABEL(__brk)
|
||||
|
@ -17,3 +17,4 @@ ENTRY(__clone)
|
||||
1:
|
||||
ret
|
||||
END(__clone)
|
||||
.hidden _C_LABEL(__clone)
|
||||
|
@ -17,3 +17,4 @@ ENTRY(__epoll_pwait)
|
||||
1:
|
||||
ret
|
||||
END(__epoll_pwait)
|
||||
.hidden _C_LABEL(__epoll_pwait)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__getcpu)
|
||||
1:
|
||||
ret
|
||||
END(__getcpu)
|
||||
.hidden _C_LABEL(__getcpu)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__getcwd)
|
||||
1:
|
||||
ret
|
||||
END(__getcwd)
|
||||
.hidden _C_LABEL(__getcwd)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__getpriority)
|
||||
1:
|
||||
ret
|
||||
END(__getpriority)
|
||||
.hidden _C_LABEL(__getpriority)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__ioctl)
|
||||
1:
|
||||
ret
|
||||
END(__ioctl)
|
||||
.hidden _C_LABEL(__ioctl)
|
||||
|
@ -17,3 +17,4 @@ ENTRY(__openat)
|
||||
1:
|
||||
ret
|
||||
END(__openat)
|
||||
.hidden _C_LABEL(__openat)
|
||||
|
@ -17,3 +17,4 @@ ENTRY(__ppoll)
|
||||
1:
|
||||
ret
|
||||
END(__ppoll)
|
||||
.hidden _C_LABEL(__ppoll)
|
||||
|
@ -17,3 +17,4 @@ ENTRY(__pselect6)
|
||||
1:
|
||||
ret
|
||||
END(__pselect6)
|
||||
.hidden _C_LABEL(__pselect6)
|
||||
|
@ -17,3 +17,4 @@ ENTRY(__ptrace)
|
||||
1:
|
||||
ret
|
||||
END(__ptrace)
|
||||
.hidden _C_LABEL(__ptrace)
|
||||
|
@ -17,3 +17,4 @@ ENTRY(__reboot)
|
||||
1:
|
||||
ret
|
||||
END(__reboot)
|
||||
.hidden _C_LABEL(__reboot)
|
||||
|
@ -17,3 +17,4 @@ ENTRY(__rt_sigaction)
|
||||
1:
|
||||
ret
|
||||
END(__rt_sigaction)
|
||||
.hidden _C_LABEL(__rt_sigaction)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__rt_sigpending)
|
||||
1:
|
||||
ret
|
||||
END(__rt_sigpending)
|
||||
.hidden _C_LABEL(__rt_sigpending)
|
||||
|
@ -17,3 +17,4 @@ ENTRY(__rt_sigprocmask)
|
||||
1:
|
||||
ret
|
||||
END(__rt_sigprocmask)
|
||||
.hidden _C_LABEL(__rt_sigprocmask)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__rt_sigsuspend)
|
||||
1:
|
||||
ret
|
||||
END(__rt_sigsuspend)
|
||||
.hidden _C_LABEL(__rt_sigsuspend)
|
||||
|
@ -17,3 +17,4 @@ ENTRY(__rt_sigtimedwait)
|
||||
1:
|
||||
ret
|
||||
END(__rt_sigtimedwait)
|
||||
.hidden _C_LABEL(__rt_sigtimedwait)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__sched_getaffinity)
|
||||
1:
|
||||
ret
|
||||
END(__sched_getaffinity)
|
||||
.hidden _C_LABEL(__sched_getaffinity)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__syslog)
|
||||
1:
|
||||
ret
|
||||
END(__syslog)
|
||||
.hidden _C_LABEL(__syslog)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__timer_create)
|
||||
1:
|
||||
ret
|
||||
END(__timer_create)
|
||||
.hidden _C_LABEL(__timer_create)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__timer_delete)
|
||||
1:
|
||||
ret
|
||||
END(__timer_delete)
|
||||
.hidden _C_LABEL(__timer_delete)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__timer_getoverrun)
|
||||
1:
|
||||
ret
|
||||
END(__timer_getoverrun)
|
||||
.hidden _C_LABEL(__timer_getoverrun)
|
||||
|
@ -16,3 +16,4 @@ ENTRY(__timer_gettime)
|
||||
1:
|
||||
ret
|
||||
END(__timer_gettime)
|
||||
.hidden _C_LABEL(__timer_gettime)
|
||||
|
@ -17,3 +17,4 @@ ENTRY(__timer_settime)
|
||||
1:
|
||||
ret
|
||||
END(__timer_settime)
|
||||
.hidden _C_LABEL(__timer_settime)
|
||||
|
@ -17,3 +17,4 @@ ENTRY(__waitid)
|
||||
1:
|
||||
ret
|
||||
END(__waitid)
|
||||
.hidden _C_LABEL(__waitid)
|
||||
|
@ -233,10 +233,17 @@ def make__NR_name(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"]
|
||||
for alias in aliases:
|
||||
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
|
||||
|
||||
|
||||
@ -334,22 +341,22 @@ class State:
|
||||
syscall["__NR_name"] = make__NR_name(syscall["name"])
|
||||
|
||||
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["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:
|
||||
syscall["asm-x86"] = add_aliases(x86_genstub(syscall), syscall)
|
||||
syscall["asm-x86"] = add_footer(32, x86_genstub(syscall), syscall)
|
||||
elif syscall["socketcall_id"] >= 0:
|
||||
E("socketcall_id for dispatch syscalls is only supported for x86 in '%s'" % t)
|
||||
return
|
||||
|
||||
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"):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user