summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1999-09-05 21:12:53 +0000
committerjdp <jdp@FreeBSD.org>1999-09-05 21:12:53 +0000
commitc0f970ba239818655f91cf054e0227743013b7fe (patch)
tree4758ef4a15aa702f27441676f21fdb9b8542cf8e /libexec/rtld-elf
parent3489469f10c91236e7880ef77abd48ccc435503a (diff)
downloadFreeBSD-src-c0f970ba239818655f91cf054e0227743013b7fe.zip
FreeBSD-src-c0f970ba239818655f91cf054e0227743013b7fe.tar.gz
Make jdk-1.1.8 work again. It turns out that some code inside
libjava peeks into the dynamic linker's private Obj_Entry structures. My recent changes introduced some new members near the front of the structures, causing libjava to get the wrong fields. This commit moves the new members toward the end of the structure so that the layout of the portion that is relevant to JDK remains the same as before. I will work with the JDK porting team to see if we can come up with a less fragile way for them to do what they need to do. I understand the current approach was necessary in order to work around some limitations of the dynamic linker. Maybe it's not necessary any more.
Diffstat (limited to 'libexec/rtld-elf')
-rw-r--r--libexec/rtld-elf/rtld.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h
index 0cdbe4c..c63e7d0 100644
--- a/libexec/rtld-elf/rtld.h
+++ b/libexec/rtld-elf/rtld.h
@@ -70,6 +70,10 @@ typedef struct Struct_Needed_Entry {
*
* Items marked with "(%)" are dynamically allocated, and must be freed
* when the structure is destroyed.
+ *
+ * CAUTION: It appears that the JDK port peeks into these structures.
+ * It looks at "next" and "mapbase" at least. Don't add new members
+ * near the front, until this can be straightened out.
*/
typedef struct Struct_Obj_Entry {
/*
@@ -80,12 +84,7 @@ typedef struct Struct_Obj_Entry {
Elf_Word version; /* Version number of struct format */
struct Struct_Obj_Entry *next;
- Objlist dldags; /* Object belongs to these dlopened DAGs (%) */
- Objlist dagmembers; /* DAG has these members (%) */
char *path; /* Pathname of underlying file (%) */
- dev_t dev; /* Object's filesystem's device */
- ino_t ino; /* Object's inode number */
- unsigned long mark; /* Set to "curmark" to avoid repeat visits */
int refcount;
int dl_refcount; /* Number of times loaded by dlopen */
@@ -133,6 +132,11 @@ typedef struct Struct_Obj_Entry {
bool traced; /* Already printed in ldd trace output */
struct link_map linkmap; /* for GDB */
+ Objlist dldags; /* Object belongs to these dlopened DAGs (%) */
+ Objlist dagmembers; /* DAG has these members (%) */
+ dev_t dev; /* Object's filesystem's device */
+ ino_t ino; /* Object's inode number */
+ unsigned long mark; /* Set to "curmark" to avoid repeat visits */
} Obj_Entry;
#define RTLD_MAGIC 0xd550b87a
OpenPOWER on IntegriCloud