From 8345a76018851ba52e05216e3d7c772e24d5da44 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 1 Oct 2017 15:10:12 -0700 Subject: Mark internal argp functions with attribute_hidden [BZ #18822] Mark internal argp functions with attribute_hidden to allow direct access to them within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * argp/argp-fmtstream.c: Include . * argp/argp-fs-xinl.c: Likewise. * argp/argp-help.c: Include and . * argp/argp-parse.c: Include . * argp/argp-xinl.c: Likewise. * include/argp-fmtstream.h: New file. * include/argp.h (__argp_error): Add attribute_hidden. (__argp_failure): Likewise. (__argp_input): Likewise. (__argp_state_help): Likewise. --- include/argp-fmtstream.h | 19 +++++++++++++++++++ include/argp.h | 10 ++++++++++ 2 files changed, 29 insertions(+) create mode 100644 include/argp-fmtstream.h (limited to 'include') diff --git a/include/argp-fmtstream.h b/include/argp-fmtstream.h new file mode 100644 index 0000000000..45c65ce834 --- /dev/null +++ b/include/argp-fmtstream.h @@ -0,0 +1,19 @@ +#ifndef _ARGP_FMTSTREAM_H +#include + +#ifndef _ISOMAC +extern __typeof (__argp_fmtstream_ensure) __argp_fmtstream_ensure + attribute_hidden; +extern __typeof (__argp_fmtstream_free) __argp_fmtstream_free + attribute_hidden; +extern __typeof (__argp_fmtstream_printf) __argp_fmtstream_printf + attribute_hidden; +extern __typeof (__argp_fmtstream_update) __argp_fmtstream_update + attribute_hidden; +extern __typeof (__argp_fmtstream_write) __argp_fmtstream_write + attribute_hidden; +extern __typeof (__argp_make_fmtstream) __argp_make_fmtstream + attribute_hidden; +#endif + +#endif diff --git a/include/argp.h b/include/argp.h index 92be5f90f1..6cf8782060 100644 --- a/include/argp.h +++ b/include/argp.h @@ -1 +1,11 @@ +#ifndef _ARGP_H #include + +#ifndef _ISOMAC +extern __typeof (__argp_error) __argp_error attribute_hidden; +extern __typeof (__argp_failure) __argp_failure attribute_hidden; +extern __typeof (__argp_input) __argp_input attribute_hidden; +extern __typeof (__argp_state_help) __argp_state_help attribute_hidden; +#endif + +#endif -- cgit v1.2.1