yann@1: Message-ID: <20040926095115.9204.qmail@webmail-2-5.mesa1.secureserver.net> yann@1: Date: Sun, 26 Sep 2004 02:51:15 -0700 yann@1: From: ml@bitbash.net yann@1: Subject: RE: crosstool-0.28-rc36: ld.so.1 undefined reference yann@1: To: Dan Kegel yann@1: cc: crossgcc@sources.redhat.com yann@1: yann@1: gcc-3.4.0-glibc-2.2.5 barfs with a few undefined refereces and multiple yann@1: definitions. The follwing patch seems to take care of the undefined yann@1: reference of __dl_runtime_resolve symbol. yann@1: yann@1: Filename: patches/glibc-2.2.5/glibc-2.2.5-mips-dl-machine-1.60.patch yann@1: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ yann@1: Retrieved with yann@1: 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: See http://sources.redhat.com/ml/libc-alpha/2002-02/msg00091.html yann@1: See also glibc-2.2.5-mips-build-gmon.patch, which takes care of the other part of this for mips. yann@1: yann@1: ChangeLog: yann@1: sysdeps/mips/dl-machine.h (elf_machine_matches_host): Use yann@1: __attribute_used__. yann@1: (__dl_runtime_resolve): Likewise. yann@1: yann@1: Fixes error yann@1: yann@1: /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: undefined reference to `__dl_runtime_resolve' yann@1: yann@1: =================================================================== yann@1: RCS file: /cvs/glibc/libc/sysdeps/mips/dl-machine.h,v yann@1: retrieving revision 1.59 yann@1: retrieving revision 1.60 yann@1: diff -u -r1.59 -r1.60 yann@1: --- libc/sysdeps/mips/dl-machine.h 2002/02/03 00:29:15 1.59 yann@1: +++ libc/sysdeps/mips/dl-machine.h 2002/02/08 18:56:57 1.60 yann@1: @@ -69,7 +69,7 @@ yann@1: } while (0) yann@1: yann@1: /* Return nonzero iff ELF header is compatible with the running host. */ yann@1: -static inline int __attribute__ ((unused)) yann@1: +static inline int __attribute_used__ yann@1: elf_machine_matches_host (const ElfW(Ehdr) *ehdr) yann@1: { yann@1: switch (ehdr->e_machine) yann@1: @@ -262,7 +262,7 @@ yann@1: /* This is called from assembly stubs below which the compiler can't see. */ \ yann@1: static ElfW(Addr) \ yann@1: __dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \ yann@1: - __attribute__ ((unused)); \ yann@1: + __attribute_used__; \ yann@1: \ yann@1: static ElfW(Addr) \ yann@1: __dl_runtime_resolve (ElfW(Word) sym_index, \