From f04b9a68febb179fc90095ae4f9fb2b7ec68a901 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 17 Feb 2004 02:35:52 +0000 Subject: [PATCH] Update. * elf/rtld.c (dl_main): Don't fail execution if file named in ld.so.preload is not present. --- ChangeLog | 3 ++ elf/rtld.c | 41 +++++++++++++++++----- localedata/ChangeLog | 5 +++ localedata/locales/tr_TR | 74 ++++++++++++++++++++-------------------- 4 files changed, 77 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index aaea3baebd..4842a71b71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-02-16 Ulrich Drepper + * elf/rtld.c (dl_main): Don't fail execution if file named in + ld.so.preload is not present. + * sysdeps/posix/getaddrinfo.c (getaddrinfo): Undo unintended changes in last patch. diff --git a/elf/rtld.c b/elf/rtld.c index e0f9f28944..f988dd4519 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -514,8 +514,11 @@ struct map_args { /* Argument to map_doit. */ char *str; + struct link_map *loader; + int is_preloaded; + int mode; /* Return value of map_doit. */ - struct link_map *main_map; + struct link_map *map; }; /* Arguments to version_check_doit. */ @@ -537,8 +540,9 @@ static void map_doit (void *a) { struct map_args *args = (struct map_args *) a; - args->main_map = INTUSE(_dl_map_object) (NULL, args->str, 0, lt_library, 0, - __RTLD_OPENEXEC); + args->map = INTUSE(_dl_map_object) (args->loader, args->str, + args->is_preloaded, lt_library, 0, + args->mode); } static void @@ -798,6 +802,9 @@ of this helper program; chances are you did not intend to run this program.\n\ struct map_args args; args.str = rtld_progname; + args.loader = NULL; + args.is_preloaded = 0; + args.mode = __RTLD_OPENEXEC; (void) INTUSE(_dl_catch_error) (&objname, &err_str, map_doit, &args); if (__builtin_expect (err_str != NULL, 0)) /* We don't free the returned string, the programs stops @@ -1084,7 +1091,8 @@ of this helper program; chances are you did not intend to run this program.\n\ } /* Read the contents of the file. */ - file = _dl_sysdep_read_whole_file ("/etc/ld.so.preload", &file_size, + const char preload_file[] = "/etc/ld.so.preload"; + file = _dl_sysdep_read_whole_file (preload_file, &file_size, PROT_READ | PROT_WRITE); if (__builtin_expect (file != MAP_FAILED, 0)) { @@ -1139,11 +1147,26 @@ of this helper program; chances are you did not intend to run this program.\n\ while ((p = strsep (&runp, ": \t\n")) != NULL) if (p[0] != '\0') { - struct link_map *new_map = INTUSE(_dl_map_object) (GL(dl_loaded), - p, 1, - lt_library, - 0, 0); - if (++new_map->l_opencount == 1) + const char *objname; + const char *err_str = NULL; + struct map_args args; + + args.str = p; + args.loader = GL(dl_loaded); + args.is_preloaded = 1; + args.mode = 0; + + (void) INTUSE(_dl_catch_error) (&objname, &err_str, map_doit, + &args); + if (__builtin_expect (err_str != NULL, 0)) + { + _dl_error_printf ("\ +ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n", + p, preload_file); + /* No need to call free, this is still before the libc's + malloc is used. */ + } + else if (++args.map->l_opencount == 1) /* It is no duplicate. */ ++npreloads; } diff --git a/localedata/ChangeLog b/localedata/ChangeLog index fdf57ad59e..e0cf9bd308 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,8 @@ +2004-02-16 Ulrich Drepper + + * locales/tr_TR: Correct sorting order of the normal and dotless I + [BZ #19]. + 2004-02-09 Ulrich Drepper * locales/fa_IR: Add to_outpunct info and change decimal_point and diff --git a/localedata/locales/tr_TR b/localedata/locales/tr_TR index 6673ec5b7a..44fee79941 100644 --- a/localedata/locales/tr_TR +++ b/localedata/locales/tr_TR @@ -1132,9 +1132,9 @@ UNDEFINED IGNORE;IGNORE;IGNORE ;;;IGNORE "";"";"";IGNORE - "";"";"";IGNORE + "";"";"";IGNORE "";"";"";IGNORE - "";"";"";IGNORE + "";"";"";IGNORE "";"";"";IGNORE ;;;IGNORE ;;;IGNORE @@ -1174,41 +1174,41 @@ UNDEFINED IGNORE;IGNORE;IGNORE ;;;IGNORE ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE - "";"";"";IGNORE - "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE ;;;IGNORE ;;;IGNORE ;;;IGNORE @@ -3553,7 +3553,7 @@ END LC_MEASUREMENT LC_NAME name_fmt "/ " -% Say-Mýn-A +% Say.MŽýn name_gen "" % Bay name_mr ""