[uClibc] patch for gcj 3.4.2

David Meggy dmeggy at techsol.ca
Thu Sep 16 22:14:52 UTC 2004


Here is a patch for gcc 3.4.2 to get gcj to compile with uClibc.  All I
did was grab the structure and define the function as weak from glibc
headers.  GCC actually checks if the function exists at runtime so this
doesn't seem to be a problem.

David

--- gcc-3.4.2.orig/boehm-gc/dyn_load.c	Wed Jul 30 10:42:28 2003
+++ gcc-3.4.2/boehm-gc/dyn_load.c	Thu Sep 16 13:45:03 2004
@@ -86,6 +86,21 @@
 #   include <stddef.h>
 #   include <elf.h>
 #   include <link.h>
+
+//stolen from glibc link.h
+
+struct dl_phdr_info
+{
+	ElfW(Addr) dlpi_addr;
+	const char *dlpi_name;
+	const ElfW(Phdr) *dlpi_phdr;
+	ElfW(Half) dlpi_phnum;
+};
+
+extern int dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
+			size_t size, void *data),
+		void *data) __THROW __attribute__ ((weak));
+
 #endif
 
 /* Newer versions of GNU/Linux define this macro.  We

-- 
~~~~~~~~~~~~~~~~~~~~~~~~
     David Meggy
     Engineering

Technical Solutions Inc.
Unit #1 7157 Honeyman St
Delta BC Canada, V4G 1E2
     www.techsol.ca

eMail: dmeggy at techsol.ca
Tel: 604 946 TECH (8324)
Fax: 604 946 6445
~~~~~~~~~~~~~~~~~~~~~~~~




More information about the uClibc mailing list