diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 15:04:24 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 15:04:24 +0000 |
commit | 76a149ca08631b519040faf8de67da010fc9e33d (patch) | |
tree | e8e9d1dbae335a4e13cdec1aaa67641656a0e772 | |
parent | e64da3e7d9bbf00dda616b6dc43a9b89706dda90 (diff) | |
download | glibc-76a149ca08631b519040faf8de67da010fc9e33d.tar glibc-76a149ca08631b519040faf8de67da010fc9e33d.tar.gz glibc-76a149ca08631b519040faf8de67da010fc9e33d.tar.bz2 glibc-76a149ca08631b519040faf8de67da010fc9e33d.zip |
2007-03-16 Jakub Jelinek <jakub@redhat.com>
* elf/dl-open.c (dl_open_worker): Declare l in 2 different
smaller scopes.
* elf/dl-dst.h (DL_DST_REQ_STATIC): Add l as macro argument.
(DL_DST_REQUIRED): Adjust user.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | elf/dl-dst.h | 6 | ||||
-rw-r--r-- | elf/dl-open.c | 5 |
3 files changed, 13 insertions, 5 deletions
@@ -1,3 +1,10 @@ +2007-03-16 Jakub Jelinek <jakub@redhat.com> + + * elf/dl-open.c (dl_open_worker): Declare l in 2 different + smaller scopes. + * elf/dl-dst.h (DL_DST_REQ_STATIC): Add l as macro argument. + (DL_DST_REQUIRED): Adjust user. + 2007-03-15 Jakub Jelinek <jakub@redhat.com> * locale/programs/ld-ctype.c (find_translit): Return NULL if ctype is diff --git a/elf/dl-dst.h b/elf/dl-dst.h index 83d16bdb0e..37465ee2b3 100644 --- a/elf/dl-dst.h +++ b/elf/dl-dst.h @@ -50,7 +50,7 @@ \ First get the origin string if it is not available yet. \ This can only happen for the map of the executable. */ \ - DL_DST_REQ_STATIC \ + DL_DST_REQ_STATIC (l) \ if ((l)->l_origin == NULL) \ { \ assert ((l)->l_name[0] == '\0'); \ @@ -68,9 +68,9 @@ __len; }) #ifdef SHARED -# define DL_DST_REQ_STATIC /* nothing */ +# define DL_DST_REQ_STATIC(l) /* nothing */ #else -# define DL_DST_REQ_STATIC \ +# define DL_DST_REQ_STATIC(l) \ if ((l) == NULL) \ { \ const char *origin = _dl_get_origin (); \ diff --git a/elf/dl-open.c b/elf/dl-open.c index 50c0d54f27..bb80e77095 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -160,7 +160,7 @@ dl_open_worker (void *a) struct dl_open_args *args = a; const char *file = args->file; int mode = args->mode; - struct link_map *new, *l; + struct link_map *new; int lazy; unsigned int i; #ifdef USE_TLS @@ -187,6 +187,7 @@ dl_open_worker (void *a) By default we assume this is the main application. */ call_map = GL(dl_ns)[LM_ID_BASE]._ns_loaded; + struct link_map *l; for (Lmid_t ns = 0; ns < DL_NNS; ++ns) for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next) if (caller_dlopen >= (const void *) l->l_map_start @@ -326,7 +327,7 @@ dl_open_worker (void *a) /* Relocate the objects loaded. We do this in reverse order so that copy relocs of earlier objects overwrite the data written by later objects. */ - l = new; + struct link_map *l = new; while (l->l_next) l = l->l_next; while (1) |