mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
(malloc): Declare _end as hidden. (__errno_location): New function. Declare errno as hidden.
This commit is contained in:
parent
212baf8d3a
commit
3646145597
@ -37,8 +37,10 @@ static void *alloc_ptr, *alloc_end, *alloc_last_block;
|
|||||||
/* Declarations of global functions. */
|
/* Declarations of global functions. */
|
||||||
extern void weak_function free (void *ptr);
|
extern void weak_function free (void *ptr);
|
||||||
extern void * weak_function realloc (void *ptr, size_t n);
|
extern void * weak_function realloc (void *ptr, size_t n);
|
||||||
extern unsigned long int weak_function __strtoul_internal
|
extern unsigned long int weak_function __strtoul_internal (const char *nptr,
|
||||||
(const char *nptr, char **endptr, int base, int group);
|
char **endptr,
|
||||||
|
int base,
|
||||||
|
int group);
|
||||||
extern unsigned long int weak_function strtoul (const char *nptr,
|
extern unsigned long int weak_function strtoul (const char *nptr,
|
||||||
char **endptr, int base);
|
char **endptr, int base);
|
||||||
|
|
||||||
@ -59,7 +61,7 @@ malloc (size_t n)
|
|||||||
if (alloc_end == 0)
|
if (alloc_end == 0)
|
||||||
{
|
{
|
||||||
/* Consume any unused space in the last page of our data segment. */
|
/* Consume any unused space in the last page of our data segment. */
|
||||||
extern int _end;
|
extern int _end attribute_hidden;
|
||||||
alloc_ptr = &_end;
|
alloc_ptr = &_end;
|
||||||
alloc_end = (void *) 0 + (((alloc_ptr - (void *) 0)
|
alloc_end = (void *) 0 + (((alloc_ptr - (void *) 0)
|
||||||
+ GL(dl_pagesize) - 1)
|
+ GL(dl_pagesize) - 1)
|
||||||
@ -350,3 +352,14 @@ strong_alias (__strsep, __strsep_g)
|
|||||||
up to 36. We don't need this here. */
|
up to 36. We don't need this here. */
|
||||||
const char INTUSE(_itoa_lower_digits)[16] attribute_hidden
|
const char INTUSE(_itoa_lower_digits)[16] attribute_hidden
|
||||||
= "0123456789abcdef";
|
= "0123456789abcdef";
|
||||||
|
|
||||||
|
|
||||||
|
#undef errno
|
||||||
|
/* The 'errno' in ld.so is not exported. */
|
||||||
|
extern int errno attribute_hidden;
|
||||||
|
|
||||||
|
int *
|
||||||
|
__errno_location (void)
|
||||||
|
{
|
||||||
|
return &errno;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user