diff options
author | Richard Henderson <rth@twiddle.net> | 2010-03-26 09:16:21 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2010-03-26 09:16:21 -0700 |
commit | b1c1949e60e7c61bcd9f40f712d07494596491b2 (patch) | |
tree | 84648ee4af35a882c7885d9cc6634d3c1639458b /elf/dl-sysdep.c | |
parent | 07f9ca32a96891c90cb80aee780c8cee2c9504e4 (diff) | |
download | glibc-b1c1949e60e7c61bcd9f40f712d07494596491b2.zip glibc-b1c1949e60e7c61bcd9f40f712d07494596491b2.tar.gz glibc-b1c1949e60e7c61bcd9f40f712d07494596491b2.tar.bz2 |
Don't take the address of a void object.
GCC 4.5 warns about "extern void _end; &end;".
Use char[] instead, as that also doesn't fall foul
of a target's .sdata optimizations.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'elf/dl-sysdep.c')
-rw-r--r-- | elf/dl-sysdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c index 5507e57..160503d 100644 --- a/elf/dl-sysdep.c +++ b/elf/dl-sysdep.c @@ -47,7 +47,7 @@ #endif extern char **_environ attribute_hidden; -extern void _end attribute_hidden; +extern char _end[] attribute_hidden; /* Protect SUID program against misuse of file descriptors. */ extern void __libc_check_standard_fds (void); @@ -226,14 +226,14 @@ _dl_sysdep_start (void **start_argptr, if (GLRO(dl_platform) != NULL) GLRO(dl_platformlen) = strlen (GLRO(dl_platform)); - if (__sbrk (0) == &_end) + if (__sbrk (0) == _end) /* The dynamic linker was run as a program, and so the initial break starts just after our bss, at &_end. The malloc in dl-minimal.c will consume the rest of this page, so tell the kernel to move the break up that far. When the user program examines its break, it will see this new value and not clobber our data. */ __sbrk (GLRO(dl_pagesize) - - ((&_end - (void *) 0) & (GLRO(dl_pagesize) - 1))); + - ((_end - (char *) 0) & (GLRO(dl_pagesize) - 1))); /* If this is a SUID program we make sure that FDs 0, 1, and 2 are allocated. If necessary we are doing it ourself. If it is not |