diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-09-05 12:43:34 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-09-05 14:05:14 -0400 |
commit | 9b95fd0944e4206949e90633c3fed088202810ec (patch) | |
tree | 4af9c66139abfef78854aca3200f836153727c23 /src/ldso/dlerror.c | |
parent | 2de29bc994029b903a366b8a4a9f8c3c3ee2be90 (diff) | |
download | musl-9b95fd0944e4206949e90633c3fed088202810ec.tar.gz musl-9b95fd0944e4206949e90633c3fed088202810ec.tar.xz musl-9b95fd0944e4206949e90633c3fed088202810ec.zip |
define and use internal macros for hidden visibility, weak refs
this cleans up what had become widespread direct inline use of "GNU C" style attributes directly in the source, and lowers the barrier to increased use of hidden visibility, which will be useful to recovering some of the efficiency lost when the protected visibility hack was dropped in commit dc2f368e565c37728b0d620380b849c3a1ddd78f, especially on archs where the PLT ABI is costly.
Diffstat (limited to 'src/ldso/dlerror.c')
-rw-r--r-- | src/ldso/dlerror.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ldso/dlerror.c b/src/ldso/dlerror.c index 378f0356..c8c718ab 100644 --- a/src/ldso/dlerror.c +++ b/src/ldso/dlerror.c @@ -23,8 +23,7 @@ void __dl_thread_cleanup(void) free(self->dlerror_buf); } -__attribute__((__visibility__("hidden"))) -void __dl_vseterr(const char *fmt, va_list ap) +hidden void __dl_vseterr(const char *fmt, va_list ap) { va_list ap2; va_copy(ap2, ap); @@ -43,8 +42,7 @@ void __dl_vseterr(const char *fmt, va_list ap) self->dlerror_flag = 1; } -__attribute__((__visibility__("hidden"))) -void __dl_seterr(const char *fmt, ...) +hidden void __dl_seterr(const char *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -52,8 +50,7 @@ void __dl_seterr(const char *fmt, ...) va_end(ap); } -__attribute__((__visibility__("hidden"))) -int __dl_invalid_handle(void *); +hidden int __dl_invalid_handle(void *); static int stub_invalid_handle(void *h) { |