yann@1
|
1 |
From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
|
yann@1
|
2 |
Fixes
|
yann@1
|
3 |
rtld.c: In function '_dl_start':
|
yann@1
|
4 |
dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
|
yann@1
|
5 |
dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
|
yann@1
|
6 |
when compiling glibc-2.3.4 with gcc-4.0
|
yann@1
|
7 |
|
yann@1
|
8 |
But see also
|
yann@1
|
9 |
http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
|
yann@1
|
10 |
and
|
yann@1
|
11 |
http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
|
yann@1
|
12 |
which seem to propose less radical fixes?
|
yann@1
|
13 |
|
yann@1
|
14 |
Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
|
yann@1
|
15 |
|
yann@1
|
16 |
--- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
|
yann@1
|
17 |
+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
|
yann@1
|
18 |
@@ -19,47 +19,6 @@
|
yann@1
|
19 |
|
yann@1
|
20 |
#include <elf.h>
|
yann@1
|
21 |
#include <assert.h>
|
yann@1
|
22 |
-
|
yann@1
|
23 |
-#ifdef RESOLVE
|
yann@1
|
24 |
-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
|
yann@1
|
25 |
- ElfW(Addr), because not all architectures can assume that the
|
yann@1
|
26 |
- relocated address is properly aligned, whereas the compiler is
|
yann@1
|
27 |
- entitled to assume that a pointer to a type is properly aligned for
|
yann@1
|
28 |
- the type. Even if we cast the pointer back to some other type with
|
yann@1
|
29 |
- less strict alignment requirements, the compiler might still
|
yann@1
|
30 |
- remember that the pointer was originally more aligned, thereby
|
yann@1
|
31 |
- optimizing away alignment tests or using word instructions for
|
yann@1
|
32 |
- copying memory, breaking the very code written to handle the
|
yann@1
|
33 |
- unaligned cases. */
|
yann@1
|
34 |
-# if ! ELF_MACHINE_NO_REL
|
yann@1
|
35 |
-auto inline void __attribute__((always_inline))
|
yann@1
|
36 |
-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
|
yann@1
|
37 |
- const ElfW(Sym) *sym, const struct r_found_version *version,
|
yann@1
|
38 |
- void *const reloc_addr);
|
yann@1
|
39 |
-auto inline void __attribute__((always_inline))
|
yann@1
|
40 |
-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
|
yann@1
|
41 |
- void *const reloc_addr);
|
yann@1
|
42 |
-# endif
|
yann@1
|
43 |
-# if ! ELF_MACHINE_NO_RELA
|
yann@1
|
44 |
-auto inline void __attribute__((always_inline))
|
yann@1
|
45 |
-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
|
yann@1
|
46 |
- const ElfW(Sym) *sym, const struct r_found_version *version,
|
yann@1
|
47 |
- void *const reloc_addr);
|
yann@1
|
48 |
-auto inline void __attribute__((always_inline))
|
yann@1
|
49 |
-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
|
yann@1
|
50 |
- void *const reloc_addr);
|
yann@1
|
51 |
-# endif
|
yann@1
|
52 |
-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
|
yann@1
|
53 |
-auto inline void __attribute__((always_inline))
|
yann@1
|
54 |
-elf_machine_lazy_rel (struct link_map *map,
|
yann@1
|
55 |
- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
|
yann@1
|
56 |
-# else
|
yann@1
|
57 |
-auto inline void __attribute__((always_inline))
|
yann@1
|
58 |
-elf_machine_lazy_rel (struct link_map *map,
|
yann@1
|
59 |
- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
|
yann@1
|
60 |
-# endif
|
yann@1
|
61 |
-#endif
|
yann@1
|
62 |
-
|
yann@1
|
63 |
#include <dl-machine.h>
|
yann@1
|
64 |
|
yann@1
|
65 |
#ifndef VERSYMIDX
|
yann@1
|
66 |
|
yann@1
|
67 |
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
|