]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/glibc/glibc-2.3.2/50_glibc232-mips-buildfix.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / glibc / glibc-2.3.2 / 50_glibc232-mips-buildfix.patch
1 --- sysdeps/mips/dl-machine.h   22 Mar 2003 12:50:46 -0000      1.68
2 +++ sysdeps/mips/dl-machine.h   5 May 2003 08:53:35 -0000
3 @@ -534,13 +534,14 @@ static inline void
4  #endif
5  elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
6                  const ElfW(Sym) *sym, const struct r_found_version *version,
7 -                /* We use void* because the location to be relocated
8 -                   is not required to be properly aligned for a
9 -                   ELFW(Addr).  */
10 -                void /* ElfW(Addr) */ *const reloc_addr)
11 +                ElfW(Addr) *const reloc_addr)
12  {
13    const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info);
14  
15 +/* We use void* because the location to be relocated is not required
16 +   to be properly aligned for a ELFW(Addr).  */
17 +  void *const r_addr = reloc_addr;
18 +
19  #if !defined RTLD_BOOTSTRAP && !defined SHARED
20    /* This is defined in rtld.c, but nowhere in the static libc.a;
21       make the reference weak so static programs can still link.  This
22 @@ -565,7 +566,7 @@ elf_machine_rel (struct link_map *map, c
23         /* Support relocations on mis-aligned offsets.  Should we ever
24            implement RELA, this should be replaced with an assignment
25            from reloc->r_addend.  */
26 -       __builtin_memcpy (&reloc_value, reloc_addr, sizeof (reloc_value));
27 +       __builtin_memcpy (&reloc_value, r_addr, sizeof (reloc_value));
28  
29         if (symidx)
30           {
31 @@ -613,7 +614,7 @@ elf_machine_rel (struct link_map *map, c
32  #endif
33             reloc_value += map->l_addr;
34  
35 -       __builtin_memcpy (reloc_addr, &reloc_value, sizeof (reloc_value));
36 +       __builtin_memcpy (r_addr, &reloc_value, sizeof (reloc_value));
37        }
38        break;
39      case R_MIPS_NONE:          /* Alright, Wilbur.  */
40 @@ -640,7 +641,7 @@ elf_machine_rel (struct link_map *map, c
41  
42  static inline void
43  elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
44 -                         void /* ElfW(Addr) */ *const reloc_addr)
45 +                         ElfW(Addr) *const reloc_addr)
46  {
47    /* XXX Nothing to do.  There is no relative relocation, right?  */
48  }