summaryrefslogtreecommitdiff
path: root/ldso/include
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-08-19 13:11:09 +0000
committerEric Andersen <andersen@codepoet.org>2003-08-19 13:11:09 +0000
commit2711bc5895accc67e27232d9b75fc12c7994837f (patch)
tree945cf31c093b07bbdc09222c405297b7951336d1 /ldso/include
parentbca6a155c79147f706242ed7c590a3538e407a40 (diff)
Cool. Found most of the problem. Turns out we were inadvertanly loading some
libraries multiple times, wasting memory and causing different libraries to use different symbol sets, some of which were not properly resolved. Continue scrubbing ld.so and converting it to use proper types.
Diffstat (limited to 'ldso/include')
-rw-r--r--ldso/include/dl-hash.h31
-rw-r--r--ldso/include/ld_hash.h31
2 files changed, 16 insertions, 46 deletions
diff --git a/ldso/include/dl-hash.h b/ldso/include/dl-hash.h
index d7ed5ab2c..246ed2608 100644
--- a/ldso/include/dl-hash.h
+++ b/ldso/include/dl-hash.h
@@ -12,13 +12,13 @@ struct dyn_elf{
struct dyn_elf * next;
struct dyn_elf * prev;
};
-
+
struct elf_resolve{
/* These entries must be in this order to be compatible with the interface used
by gdb to obtain the list of symbols. */
- char * loadaddr;
- char * libname;
- unsigned long dynamic_addr;
+ ElfW(Addr) loadaddr; /* Base address shared object is loaded at. */
+ char *libname; /* Absolute file name object was found in. */
+ ElfW(Dyn) *dynamic_addr; /* Dynamic section of the shared object. */
struct elf_resolve * next;
struct elf_resolve * prev;
/* Nothing after this address is used by gdb. */
@@ -53,25 +53,10 @@ struct elf_resolve{
#endif
};
-#if 0
-/*
- * The DT_DEBUG entry in the .dynamic section is given the address of this structure.
- * gdb can pick this up to obtain the correct list of loaded modules.
- */
-
-struct r_debug{
- int r_version;
- struct elf_resolve * link_map;
- unsigned long brk_fun;
- enum {RT_CONSISTENT, RT_ADD, RT_DELETE};
- unsigned long ldbase;
-};
-#endif
-
-#define COPY_RELOCS_DONE 1
-#define RELOCS_DONE 2
-#define JMP_RELOCS_DONE 4
-#define INIT_FUNCS_CALLED 8
+#define COPY_RELOCS_DONE 1
+#define RELOCS_DONE 2
+#define JMP_RELOCS_DONE 4
+#define INIT_FUNCS_CALLED 8
extern struct dyn_elf * _dl_symbol_tables;
extern struct elf_resolve * _dl_loaded_modules;
diff --git a/ldso/include/ld_hash.h b/ldso/include/ld_hash.h
index d7ed5ab2c..246ed2608 100644
--- a/ldso/include/ld_hash.h
+++ b/ldso/include/ld_hash.h
@@ -12,13 +12,13 @@ struct dyn_elf{
struct dyn_elf * next;
struct dyn_elf * prev;
};
-
+
struct elf_resolve{
/* These entries must be in this order to be compatible with the interface used
by gdb to obtain the list of symbols. */
- char * loadaddr;
- char * libname;
- unsigned long dynamic_addr;
+ ElfW(Addr) loadaddr; /* Base address shared object is loaded at. */
+ char *libname; /* Absolute file name object was found in. */
+ ElfW(Dyn) *dynamic_addr; /* Dynamic section of the shared object. */
struct elf_resolve * next;
struct elf_resolve * prev;
/* Nothing after this address is used by gdb. */
@@ -53,25 +53,10 @@ struct elf_resolve{
#endif
};
-#if 0
-/*
- * The DT_DEBUG entry in the .dynamic section is given the address of this structure.
- * gdb can pick this up to obtain the correct list of loaded modules.
- */
-
-struct r_debug{
- int r_version;
- struct elf_resolve * link_map;
- unsigned long brk_fun;
- enum {RT_CONSISTENT, RT_ADD, RT_DELETE};
- unsigned long ldbase;
-};
-#endif
-
-#define COPY_RELOCS_DONE 1
-#define RELOCS_DONE 2
-#define JMP_RELOCS_DONE 4
-#define INIT_FUNCS_CALLED 8
+#define COPY_RELOCS_DONE 1
+#define RELOCS_DONE 2
+#define JMP_RELOCS_DONE 4
+#define INIT_FUNCS_CALLED 8
extern struct dyn_elf * _dl_symbol_tables;
extern struct elf_resolve * _dl_loaded_modules;