[34/58] Hide internal __assert_fail_base function [BZ #18822]

Message ID 20170901180029.9527-35-hjl.tools@gmail.com
State Committed
Commit 048dd6813f36c31fa21871d840a0b62f1c3a590f
Headers

Commit Message

H.J. Lu Sept. 1, 2017, 6 p.m. UTC
  Hide internal __assert_fail_base function to allow direct access within
libc.so and libc.a without using GOT nor PLT.

	[BZ #18822]
	* include/assert.h (__assert_fail_base): Add attribute_hidden.
---
 include/assert.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

H.J. Lu Oct. 1, 2017, 10:39 p.m. UTC | #1
On 9/1/17, H.J. Lu <hjl.tools@gmail.com> wrote:
> Hide internal __assert_fail_base function to allow direct access within
> libc.so and libc.a without using GOT nor PLT.
>
> 	[BZ #18822]
> 	* include/assert.h (__assert_fail_base): Add attribute_hidden.

Tested with build-many-glibcs.py.  I am checking it in.
  

Patch

diff --git a/include/assert.h b/include/assert.h
index c452667956..c0f7e1a91c 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -18,7 +18,7 @@  extern void __assert_perror_fail (int __errnum, const char *__file,
 extern void __assert_fail_base (const char *fmt, const char *assertion,
 				const char *file, unsigned int line,
 				const char *function)
-     __THROW  __attribute__ ((__noreturn__));
+     __THROW  __attribute__ ((__noreturn__)) attribute_hidden;
 
 # if IS_IN (libc) || IS_IN (rtld)
 hidden_proto (__assert_fail)