about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-07-23 22:59:19 +0000
committerUlrich Drepper <drepper@redhat.com>2002-07-23 22:59:19 +0000
commitfcda29e2604e941cbe9a9eb30c56b8b8fa607836 (patch)
tree0a869e0058db97e9367a87728cf99a17e7557f6e /elf
parentdc818ad549cd0eb2b0950983dfe7081e6c7d4641 (diff)
downloadglibc-fcda29e2604e941cbe9a9eb30c56b8b8fa607836.tar.gz
glibc-fcda29e2604e941cbe9a9eb30c56b8b8fa607836.tar.xz
glibc-fcda29e2604e941cbe9a9eb30c56b8b8fa607836.zip
(_dl_phdr): New variable. (_dl_phnum): New variable. (_dl_aux_init): Initialize _dl_phdr and _dl_phnum from aux vector.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-support.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 5452dd10fa..70ab30aedc 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -128,6 +128,9 @@ int _dl_debug_fd = STDERR_FILENO;
 
 int _dl_correct_cache_id = _DL_CACHE_DEFAULT_ID;
 
+struct ElfW(Phdr) *_dl_phdr;
+size_t _dl_phnum;
+
 /* During the program run we must not modify the global data of
    loaded shared object simultanously in two threads.  Therefore we
    protect `_dl_open' and `_dl_close' in dl-close.c.
@@ -173,6 +176,12 @@ _dl_aux_init (ElfW(auxv_t) *av)
       case AT_CLKTCK:
 	GL(dl_clktck) = av->a_un.a_val;
 	break;
+      case AT_PHDR:
+	GL(dl_phdr) = av->a_un.a_ptr;
+	break;
+      case AT_PHNUM:
+	GL(dl_phnum) = av->a_un.a_val;
+	break;
       }
 }
 #endif