glibc fix for /lib/ld.so.1 (with attachments this time)
PATCH 1/1 glibc fix for /lib/ld.so.1 (with attachments this time)
Hello parisc-linux hackers,
Finally tracked down the glibc problem (with help from tausq and others :)). I have attached the changelog entry, and the dpatch. I am assuming you will push it upstream Carlos?
When working on this problem it caused a gcc ICE. The gcc ICE has been reported at:
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10215
This is why the ENTRY_POINT macro is uglier than really necessary.
Once this patch is in glibc, then we can remove the RGH_FIX hack from the 2.4 kernels as well.
oh. This patch fixes this assert in glibc:
rbrad@vega:~$ /lib/ld.so.1 --verify /bin/sh Inconsistency detected by ld.so: rtld.c: 879: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed!
Thanks!
- Ryan
Signature · 1 line
Ryan Bradetich <[email protected]>
2003-03-26 Ryan Bradetich <[email protected]>
* sysdeps/hppa/elf/entry.h: New file.
#! /bin/sh -e
# All lines beginning with `# DP:' are a description of the patch. # DP: Description: <your description>
# DP: Author:
# DP: Upstream status: [In CVS | Debian-Specific | Pending | Not submitted ] # DP: Status Details:
# DP: Date:
if [ $# -ne 2 ]; then
echo >&2 "basename $0: script expects -patch|-unpatch as argument" exit 1
fi
case "$1" in
-patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
-unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1esac
exit 0
# append the patch here and adjust the -p? flag in the patch calls.
--- /dev/null 2003-01-25 02:37:00.000000000 -0700
+++ glibc-2.3.1/sysdeps/hppa/elf/entry.h 2003-03-27 03:55:34.000000000 -0700
@@ -0,0 +1,10 @@
+#ifndef __ASSEMBLY__
+extern void _start (void);
+#endif
+
+/* The function's entry point is stored in the first word of the
+ function descriptor (plabel) of _start(). */
+#define ENTRY_POINT ({long int *tmp = (long int *)((long)_start & ~2); tmp[0];})
+
+/* We have to provide a special declaration. */
+#define ENTRY_POINT_DECL(class) class void _start (void);Ryan,
Quoted 3 lines
Finally tracked down the glibc problem (with help from tausq and others :)). I have attached the changelog entry, and the dpatch. I am assuming you will push it upstream Carlos?
Looks good. It looks like the only real way to solve this since ia64 and powerpc64 have similar entry.h macro's.
Quoted 1 line
This is why the
ENTRY_POINTmacro is uglier than really necessary.
Not any uglier than the ia64 and powerpc64 macro's that do similar things ;)
Thank you very much for working on this! :)
c.