mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Mark internal argz functions with attribute_hidden [BZ #18822]
Move internal argz function prototypes to include/argz.h and mark them with attribute_hidden to allow direct access within libc.so and libc.a without using GOT nor PLT. This also brings string/argz.h closer to the gnulib version. [BZ #18822] * include/argz.h (__argz_create_sep): New function prototype. (__argz_append): Likewise. (__argz_add): Likewise. (__argz_add_sep): Likewise. (__argz_delete): Likewise. (__argz_insert): Likewise. (__argz_replace): Likewise. * string/argz.h (__argz_create_sep): Removed. (__argz_append): Likewise. (__argz_add): Likewise. (__argz_add_sep): Likewise. (__argz_delete): Likewise. (__argz_insert): Likewise. (__argz_replace): Likewise.
This commit is contained in:
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
|||||||
|
2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
[BZ #18822]
|
||||||
|
* include/argz.h (__argz_create_sep): New function prototype.
|
||||||
|
(__argz_append): Likewise.
|
||||||
|
(__argz_add): Likewise.
|
||||||
|
(__argz_add_sep): Likewise.
|
||||||
|
(__argz_delete): Likewise.
|
||||||
|
(__argz_insert): Likewise.
|
||||||
|
(__argz_replace): Likewise.
|
||||||
|
* string/argz.h (__argz_create_sep): Removed.
|
||||||
|
(__argz_append): Likewise.
|
||||||
|
(__argz_add): Likewise.
|
||||||
|
(__argz_add_sep): Likewise.
|
||||||
|
(__argz_delete): Likewise.
|
||||||
|
(__argz_insert): Likewise.
|
||||||
|
(__argz_replace): Likewise.
|
||||||
|
|
||||||
2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
|
2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* elf/elf.h (NT_GNU_PROPERTY_TYPE_0): New.
|
* elf/elf.h (NT_GNU_PROPERTY_TYPE_0): New.
|
||||||
|
@ -4,6 +4,38 @@
|
|||||||
|
|
||||||
# ifndef _ISOMAC
|
# ifndef _ISOMAC
|
||||||
|
|
||||||
|
extern error_t __argz_create_sep (const char *__restrict __string,
|
||||||
|
int __sep, char **__restrict __argz,
|
||||||
|
size_t *__restrict __len)
|
||||||
|
__THROW attribute_hidden;
|
||||||
|
extern error_t __argz_append (char **__restrict __argz,
|
||||||
|
size_t *__restrict __argz_len,
|
||||||
|
const char *__restrict __buf, size_t __buf_len)
|
||||||
|
__THROW attribute_hidden;
|
||||||
|
extern error_t __argz_add (char **__restrict __argz,
|
||||||
|
size_t *__restrict __argz_len,
|
||||||
|
const char *__restrict __str)
|
||||||
|
__THROW attribute_hidden;
|
||||||
|
extern error_t __argz_add_sep (char **__restrict __argz,
|
||||||
|
size_t *__restrict __argz_len,
|
||||||
|
const char *__restrict __string, int __delim)
|
||||||
|
__THROW attribute_hidden;
|
||||||
|
extern void __argz_delete (char **__restrict __argz,
|
||||||
|
size_t *__restrict __argz_len,
|
||||||
|
char *__restrict __entry)
|
||||||
|
__THROW attribute_hidden;
|
||||||
|
extern error_t __argz_insert (char **__restrict __argz,
|
||||||
|
size_t *__restrict __argz_len,
|
||||||
|
char *__restrict __before,
|
||||||
|
const char *__restrict __entry)
|
||||||
|
__THROW attribute_hidden;
|
||||||
|
extern error_t __argz_replace (char **__restrict __argz,
|
||||||
|
size_t *__restrict __argz_len,
|
||||||
|
const char *__restrict __str,
|
||||||
|
const char *__restrict __with,
|
||||||
|
unsigned int *__restrict __replace_count)
|
||||||
|
attribute_hidden;
|
||||||
|
|
||||||
libc_hidden_proto (argz_delete)
|
libc_hidden_proto (argz_delete)
|
||||||
libc_hidden_proto (__argz_count)
|
libc_hidden_proto (__argz_count)
|
||||||
libc_hidden_proto (__argz_stringify)
|
libc_hidden_proto (__argz_stringify)
|
||||||
|
@ -44,9 +44,6 @@ extern error_t argz_create (char *const __argv[], char **__restrict __argz,
|
|||||||
STRING, returning it in ARGZ, and the total length in LEN. If a
|
STRING, returning it in ARGZ, and the total length in LEN. If a
|
||||||
memory allocation error occurs, ENOMEM is returned, otherwise 0.
|
memory allocation error occurs, ENOMEM is returned, otherwise 0.
|
||||||
The result can be destroyed using free. */
|
The result can be destroyed using free. */
|
||||||
extern error_t __argz_create_sep (const char *__restrict __string,
|
|
||||||
int __sep, char **__restrict __argz,
|
|
||||||
size_t *__restrict __len) __THROW;
|
|
||||||
extern error_t argz_create_sep (const char *__restrict __string,
|
extern error_t argz_create_sep (const char *__restrict __string,
|
||||||
int __sep, char **__restrict __argz,
|
int __sep, char **__restrict __argz,
|
||||||
size_t *__restrict __len) __THROW;
|
size_t *__restrict __len) __THROW;
|
||||||
@ -70,38 +67,24 @@ extern void __argz_stringify (char *__argz, size_t __len, int __sep) __THROW;
|
|||||||
extern void argz_stringify (char *__argz, size_t __len, int __sep) __THROW;
|
extern void argz_stringify (char *__argz, size_t __len, int __sep) __THROW;
|
||||||
|
|
||||||
/* Append BUF, of length BUF_LEN to the argz vector in ARGZ & ARGZ_LEN. */
|
/* Append BUF, of length BUF_LEN to the argz vector in ARGZ & ARGZ_LEN. */
|
||||||
extern error_t __argz_append (char **__restrict __argz,
|
|
||||||
size_t *__restrict __argz_len,
|
|
||||||
const char *__restrict __buf, size_t __buf_len)
|
|
||||||
__THROW;
|
|
||||||
extern error_t argz_append (char **__restrict __argz,
|
extern error_t argz_append (char **__restrict __argz,
|
||||||
size_t *__restrict __argz_len,
|
size_t *__restrict __argz_len,
|
||||||
const char *__restrict __buf, size_t __buf_len)
|
const char *__restrict __buf, size_t __buf_len)
|
||||||
__THROW;
|
__THROW;
|
||||||
|
|
||||||
/* Append STR to the argz vector in ARGZ & ARGZ_LEN. */
|
/* Append STR to the argz vector in ARGZ & ARGZ_LEN. */
|
||||||
extern error_t __argz_add (char **__restrict __argz,
|
|
||||||
size_t *__restrict __argz_len,
|
|
||||||
const char *__restrict __str) __THROW;
|
|
||||||
extern error_t argz_add (char **__restrict __argz,
|
extern error_t argz_add (char **__restrict __argz,
|
||||||
size_t *__restrict __argz_len,
|
size_t *__restrict __argz_len,
|
||||||
const char *__restrict __str) __THROW;
|
const char *__restrict __str) __THROW;
|
||||||
|
|
||||||
/* Append SEP separated list in STRING to the argz vector in ARGZ &
|
/* Append SEP separated list in STRING to the argz vector in ARGZ &
|
||||||
ARGZ_LEN. */
|
ARGZ_LEN. */
|
||||||
extern error_t __argz_add_sep (char **__restrict __argz,
|
|
||||||
size_t *__restrict __argz_len,
|
|
||||||
const char *__restrict __string, int __delim)
|
|
||||||
__THROW;
|
|
||||||
extern error_t argz_add_sep (char **__restrict __argz,
|
extern error_t argz_add_sep (char **__restrict __argz,
|
||||||
size_t *__restrict __argz_len,
|
size_t *__restrict __argz_len,
|
||||||
const char *__restrict __string, int __delim)
|
const char *__restrict __string, int __delim)
|
||||||
__THROW;
|
__THROW;
|
||||||
|
|
||||||
/* Delete ENTRY from ARGZ & ARGZ_LEN, if it appears there. */
|
/* Delete ENTRY from ARGZ & ARGZ_LEN, if it appears there. */
|
||||||
extern void __argz_delete (char **__restrict __argz,
|
|
||||||
size_t *__restrict __argz_len,
|
|
||||||
char *__restrict __entry) __THROW;
|
|
||||||
extern void argz_delete (char **__restrict __argz,
|
extern void argz_delete (char **__restrict __argz,
|
||||||
size_t *__restrict __argz_len,
|
size_t *__restrict __argz_len,
|
||||||
char *__restrict __entry) __THROW;
|
char *__restrict __entry) __THROW;
|
||||||
@ -112,10 +95,6 @@ extern void argz_delete (char **__restrict __argz,
|
|||||||
ARGZ, ENTRY) will insert ENTRY at the beginning of ARGZ. If BEFORE is not
|
ARGZ, ENTRY) will insert ENTRY at the beginning of ARGZ. If BEFORE is not
|
||||||
in ARGZ, EINVAL is returned, else if memory can't be allocated for the new
|
in ARGZ, EINVAL is returned, else if memory can't be allocated for the new
|
||||||
ARGZ, ENOMEM is returned, else 0. */
|
ARGZ, ENOMEM is returned, else 0. */
|
||||||
extern error_t __argz_insert (char **__restrict __argz,
|
|
||||||
size_t *__restrict __argz_len,
|
|
||||||
char *__restrict __before,
|
|
||||||
const char *__restrict __entry) __THROW;
|
|
||||||
extern error_t argz_insert (char **__restrict __argz,
|
extern error_t argz_insert (char **__restrict __argz,
|
||||||
size_t *__restrict __argz_len,
|
size_t *__restrict __argz_len,
|
||||||
char *__restrict __before,
|
char *__restrict __before,
|
||||||
@ -124,11 +103,6 @@ extern error_t argz_insert (char **__restrict __argz,
|
|||||||
/* Replace any occurrences of the string STR in ARGZ with WITH, reallocating
|
/* Replace any occurrences of the string STR in ARGZ with WITH, reallocating
|
||||||
ARGZ as necessary. If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be
|
ARGZ as necessary. If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be
|
||||||
incremented by number of replacements performed. */
|
incremented by number of replacements performed. */
|
||||||
extern error_t __argz_replace (char **__restrict __argz,
|
|
||||||
size_t *__restrict __argz_len,
|
|
||||||
const char *__restrict __str,
|
|
||||||
const char *__restrict __with,
|
|
||||||
unsigned int *__restrict __replace_count);
|
|
||||||
extern error_t argz_replace (char **__restrict __argz,
|
extern error_t argz_replace (char **__restrict __argz,
|
||||||
size_t *__restrict __argz_len,
|
size_t *__restrict __argz_len,
|
||||||
const char *__restrict __str,
|
const char *__restrict __str,
|
||||||
|
Reference in New Issue
Block a user