yann@1
|
1 |
Message-ID: <20040926095115.9204.qmail@webmail-2-5.mesa1.secureserver.net>
|
yann@1
|
2 |
Date: Sun, 26 Sep 2004 02:51:15 -0700
|
yann@1
|
3 |
From: ml@bitbash.net
|
yann@1
|
4 |
Subject: RE: crosstool-0.28-rc36: ld.so.1 undefined reference
|
yann@1
|
5 |
To: Dan Kegel <dank@kegel.com>
|
yann@1
|
6 |
cc: crossgcc@sources.redhat.com
|
yann@1
|
7 |
|
yann@1
|
8 |
gcc-3.4.0-glibc-2.2.5 barfs with a few undefined refereces and multiple
|
yann@1
|
9 |
definitions. The follwing patch seems to take care of the undefined
|
yann@1
|
10 |
reference of __dl_runtime_resolve symbol.
|
yann@1
|
11 |
|
yann@1
|
12 |
Filename: patches/glibc-2.2.5/glibc-2.2.5-mips-dl-machine-1.60.patch
|
yann@1
|
13 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
yann@1
|
14 |
Retrieved with
|
yann@1
|
15 |
wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/mips/dl-machine.h.diff?r1=1.59&r2=1.60&cvsroot=glibc'
|
yann@1
|
16 |
See http://sources.redhat.com/ml/libc-alpha/2002-02/msg00091.html
|
yann@1
|
17 |
See also glibc-2.2.5-mips-build-gmon.patch, which takes care of the other part of this for mips.
|
yann@1
|
18 |
|
yann@1
|
19 |
ChangeLog:
|
yann@1
|
20 |
sysdeps/mips/dl-machine.h (elf_machine_matches_host): Use
|
yann@1
|
21 |
__attribute_used__.
|
yann@1
|
22 |
(__dl_runtime_resolve): Likewise.
|
yann@1
|
23 |
|
yann@1
|
24 |
Fixes error
|
yann@1
|
25 |
|
yann@1
|
26 |
/home/cross/crosstool-0.28-rc36/build/mips-unknown-linux-gnu/gcc-3.4.0-glibc-2.2.5/build-glibc/elf/ld.so.1:
|
yann@1
|
27 |
undefined reference to `__dl_runtime_resolve'
|
yann@1
|
28 |
|
yann@1
|
29 |
===================================================================
|
yann@1
|
30 |
RCS file: /cvs/glibc/libc/sysdeps/mips/dl-machine.h,v
|
yann@1
|
31 |
retrieving revision 1.59
|
yann@1
|
32 |
retrieving revision 1.60
|
yann@1
|
33 |
diff -u -r1.59 -r1.60
|
yann@1
|
34 |
--- libc/sysdeps/mips/dl-machine.h 2002/02/03 00:29:15 1.59
|
yann@1
|
35 |
+++ libc/sysdeps/mips/dl-machine.h 2002/02/08 18:56:57 1.60
|
yann@1
|
36 |
@@ -69,7 +69,7 @@
|
yann@1
|
37 |
} while (0)
|
yann@1
|
38 |
|
yann@1
|
39 |
/* Return nonzero iff ELF header is compatible with the running host. */
|
yann@1
|
40 |
-static inline int __attribute__ ((unused))
|
yann@1
|
41 |
+static inline int __attribute_used__
|
yann@1
|
42 |
elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
|
yann@1
|
43 |
{
|
yann@1
|
44 |
switch (ehdr->e_machine)
|
yann@1
|
45 |
@@ -262,7 +262,7 @@
|
yann@1
|
46 |
/* This is called from assembly stubs below which the compiler can't see. */ \
|
yann@1
|
47 |
static ElfW(Addr) \
|
yann@1
|
48 |
__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
|
yann@1
|
49 |
- __attribute__ ((unused)); \
|
yann@1
|
50 |
+ __attribute_used__; \
|
yann@1
|
51 |
\
|
yann@1
|
52 |
static ElfW(Addr) \
|
yann@1
|
53 |
__dl_runtime_resolve (ElfW(Word) sym_index, \
|