mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
Update.
* elf/rtld.c (process_dl_debug): Correct printing help message. * elf/dl-misc.c (_dl_debug_vdprintf): Implement precision handling for %s.
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
2002-02-05 Ulrich Drepper <drepper@redhat.com>
|
2002-02-05 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* elf/rtld.c (process_dl_debug): Correct printing help message.
|
||||||
|
* elf/dl-misc.c (_dl_debug_vdprintf): Implement precision handling
|
||||||
|
for %s.
|
||||||
|
|
||||||
* inet/getnetgrent_r.c (innetgr): Add int* parameter to getfct
|
* inet/getnetgrent_r.c (innetgr): Add int* parameter to getfct
|
||||||
definition and pass &errno in use of this variable.
|
definition and pass &errno in use of this variable.
|
||||||
Reported by Simon Wilkinson <simon@sxw.org.uk> [PR libc/2911].
|
Reported by Simon Wilkinson <simon@sxw.org.uk> [PR libc/2911].
|
||||||
|
@@ -135,6 +135,7 @@ _dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
|
|||||||
/* It is a format specifier. */
|
/* It is a format specifier. */
|
||||||
char fill = ' ';
|
char fill = ' ';
|
||||||
int width = -1;
|
int width = -1;
|
||||||
|
int prec = -1;
|
||||||
#if LONG_MAX != INT_MAX
|
#if LONG_MAX != INT_MAX
|
||||||
int long_mod = 0;
|
int long_mod = 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -154,6 +155,13 @@ _dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
|
|||||||
++fmt;
|
++fmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle precision. */
|
||||||
|
if (*fmt == '.' && fmt[1] == '*')
|
||||||
|
{
|
||||||
|
prec = va_arg (arg, int);
|
||||||
|
fmt += 2;
|
||||||
|
}
|
||||||
|
|
||||||
/* Recognize the l modifier. It is only important on some
|
/* Recognize the l modifier. It is only important on some
|
||||||
platforms where long and int have a different size. We
|
platforms where long and int have a different size. We
|
||||||
can use the same code for size_t. */
|
can use the same code for size_t. */
|
||||||
@@ -202,6 +210,8 @@ _dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
|
|||||||
/* Get the string argument. */
|
/* Get the string argument. */
|
||||||
iov[niov].iov_base = va_arg (arg, char *);
|
iov[niov].iov_base = va_arg (arg, char *);
|
||||||
iov[niov].iov_len = strlen (iov[niov].iov_base);
|
iov[niov].iov_len = strlen (iov[niov].iov_base);
|
||||||
|
if (prec != -1)
|
||||||
|
iov[niov].iov_len = MIN (prec, iov[niov].iov_len );
|
||||||
++niov;
|
++niov;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -258,11 +258,11 @@ _dl_start_final (void *arg, struct link_map *bootstrap_map_p,
|
|||||||
if (phdr[cnt].p_type == PT_TLS)
|
if (phdr[cnt].p_type == PT_TLS)
|
||||||
{
|
{
|
||||||
void *tlsblock;
|
void *tlsblock;
|
||||||
size_t align = MAX (TLS_INIT_TCB_ALIGN, phdr[cnt].p_align);
|
size_t align = MAX (TLS_INIT_TCB_ALIGN, phdr[cnt].p_align);
|
||||||
|
|
||||||
GL(dl_rtld_map).l_tls_blocksize = phdr[cnt].p_memsz;
|
GL(dl_rtld_map).l_tls_blocksize = phdr[cnt].p_memsz;
|
||||||
GL(dl_rtld_map).l_tls_initimage_size = phdr[cnt].p_filesz;
|
GL(dl_rtld_map).l_tls_initimage_size = phdr[cnt].p_filesz;
|
||||||
GL(dl_rtld_map).l_tls_initimage = (void *) (bootstrap_map_p->l_addr
|
GL(dl_rtld_map).l_tls_initimage = (void *) (GL(dl_rtld_map).l_map_start
|
||||||
+ phdr[cnt].p_offset);
|
+ phdr[cnt].p_offset);
|
||||||
|
|
||||||
/* We can now allocate the initial TLS block. This can happen
|
/* We can now allocate the initial TLS block. This can happen
|
||||||
@@ -1476,8 +1476,8 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy);
|
|||||||
Valid options for the LD_DEBUG environment variable are:\n\n");
|
Valid options for the LD_DEBUG environment variable are:\n\n");
|
||||||
|
|
||||||
for (cnt = 0; cnt < ndebopts; ++cnt)
|
for (cnt = 0; cnt < ndebopts; ++cnt)
|
||||||
_dl_printf (" %s%s %s\n", debopts[cnt].name,
|
_dl_printf (" %.*s%s%s\n", debopts[cnt].len, debopts[cnt].name,
|
||||||
" " + strlen (debopts[cnt].name) - 3,
|
" " + debopts[cnt].len - 3,
|
||||||
debopts[cnt].helptext);
|
debopts[cnt].helptext);
|
||||||
|
|
||||||
_dl_printf ("\n\
|
_dl_printf ("\n\
|
||||||
|
Reference in New Issue
Block a user