mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
Update.
* sysdeps/mips/dl-machine.h (elf_machine_got_rel): Initialize symidx correctly. * sysdeps/mips/add_n.S: Use __PIC__, add .end directive.
This commit is contained in:
@@ -7,6 +7,11 @@
|
|||||||
|
|
||||||
2000-04-14 Andreas Jaeger <aj@suse.de>
|
2000-04-14 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
|
* sysdeps/mips/dl-machine.h (elf_machine_got_rel): Initialize
|
||||||
|
symidx correctly.
|
||||||
|
|
||||||
|
* sysdeps/mips/add_n.S: Use __PIC__, add .end directive.
|
||||||
|
|
||||||
* stdlib/stdlib.h: Fix typo in comment.
|
* stdlib/stdlib.h: Fix typo in comment.
|
||||||
|
|
||||||
* shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
|
* shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/* MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and
|
/* MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and
|
||||||
store sum in a third limb vector.
|
store sum in a third limb vector.
|
||||||
|
|
||||||
Copyright (C) 1995 Free Software Foundation, Inc.
|
Copyright (C) 1995, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of the GNU MP Library.
|
This file is part of the GNU MP Library.
|
||||||
|
|
||||||
@@ -28,12 +28,12 @@ MA 02111-1307, USA. */
|
|||||||
s2_ptr $6
|
s2_ptr $6
|
||||||
size $7
|
size $7
|
||||||
*/
|
*/
|
||||||
#ifdef PIC
|
#ifdef __PIC__
|
||||||
.option pic2
|
.option pic2
|
||||||
#endif
|
#endif
|
||||||
ENTRY (__mpn_add_n)
|
ENTRY (__mpn_add_n)
|
||||||
.set noreorder
|
.set noreorder
|
||||||
#ifdef PIC
|
#ifdef __PIC__
|
||||||
.cpload t9
|
.cpload t9
|
||||||
#endif
|
#endif
|
||||||
.set nomacro
|
.set nomacro
|
||||||
@@ -119,3 +119,4 @@ ENTRY (__mpn_add_n)
|
|||||||
sw $11,0($4)
|
sw $11,0($4)
|
||||||
j $31
|
j $31
|
||||||
or $2,$2,$8
|
or $2,$2,$8
|
||||||
|
.end __mpn_add_n
|
@@ -126,6 +126,8 @@ elf_machine_load_address (void)
|
|||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
|
||||||
|
#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
|
||||||
|
|
||||||
/* Get link map for callers object containing STUB_PC. */
|
/* Get link map for callers object containing STUB_PC. */
|
||||||
static inline struct link_map *
|
static inline struct link_map *
|
||||||
@@ -476,9 +478,6 @@ elf_machine_lazy_rel (struct link_map *map,
|
|||||||
/* Do nothing. */
|
/* Do nothing. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
|
|
||||||
#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
|
|
||||||
|
|
||||||
/* Relocate GOT. */
|
/* Relocate GOT. */
|
||||||
static inline void
|
static inline void
|
||||||
elf_machine_got_rel (struct link_map *map, int lazy)
|
elf_machine_got_rel (struct link_map *map, int lazy)
|
||||||
@@ -492,37 +491,36 @@ elf_machine_got_rel (struct link_map *map, int lazy)
|
|||||||
#ifdef RTLD_BOOTSTRAP
|
#ifdef RTLD_BOOTSTRAP
|
||||||
# define RESOLVE_GOTSYM(sym,sym_index) 0
|
# define RESOLVE_GOTSYM(sym,sym_index) 0
|
||||||
#else
|
#else
|
||||||
/* FIXME: The macro RESOLVE_GOTSYM is not handling versioning. */
|
# define RESOLVE_GOTSYM(sym,sym_index) \
|
||||||
# define RESOLVE_GOTSYM(sym,sym_index) \
|
({ \
|
||||||
({ \
|
const ElfW(Sym) *ref = sym; \
|
||||||
const ElfW(Sym) *ref = sym; \
|
ElfW(Addr) value; \
|
||||||
ElfW(Addr) value; \
|
\
|
||||||
\
|
switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \
|
||||||
switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \
|
{ \
|
||||||
{ \
|
default: \
|
||||||
default: \
|
{ \
|
||||||
{ \
|
const ElfW(Half) *vernum = \
|
||||||
const ElfW(Half) *vernum = \
|
(const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); \
|
||||||
(const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); \
|
ElfW(Half) ndx = vernum[sym_index]; \
|
||||||
ElfW(Half) ndx = vernum[sym_index]; \
|
const struct r_found_version *version = &l->l_versions[ndx]; \
|
||||||
const struct r_found_version *version = &l->l_versions[ndx]; \
|
\
|
||||||
\
|
if (version->hash != 0) \
|
||||||
if (version->hash != 0) \
|
{ \
|
||||||
{ \
|
value = _dl_lookup_versioned_symbol(strtab + sym->st_name,\
|
||||||
value = _dl_lookup_versioned_symbol(strtab + sym->st_name, \
|
map, \
|
||||||
map, \
|
&ref, scope, version, \
|
||||||
&ref, scope, version, \
|
R_MIPS_REL32); \
|
||||||
R_MIPS_REL32); \
|
break; \
|
||||||
break; \
|
} \
|
||||||
} \
|
/* Fall through. */ \
|
||||||
/* Fall through. */ \
|
} \
|
||||||
} \
|
case 0: \
|
||||||
case 0: \
|
value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \
|
||||||
value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \
|
scope, R_MIPS_REL32); \
|
||||||
scope, R_MIPS_REL32); \
|
} \
|
||||||
} \
|
\
|
||||||
\
|
(ref)? value + ref->st_value: 0; \
|
||||||
(ref)? value + ref->st_value: 0; \
|
|
||||||
})
|
})
|
||||||
#endif /* RTLD_BOOTSTRAP */
|
#endif /* RTLD_BOOTSTRAP */
|
||||||
|
|
||||||
@@ -541,12 +539,11 @@ elf_machine_got_rel (struct link_map *map, int lazy)
|
|||||||
|
|
||||||
/* Handle global got entries. */
|
/* Handle global got entries. */
|
||||||
got += n;
|
got += n;
|
||||||
sym = (void *) D_PTR (map, l_info[DT_SYMTAB]);
|
/* Keep track of the symbol index. */
|
||||||
sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
|
symidx = map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
|
||||||
|
sym = (void *) D_PTR (map, l_info[DT_SYMTAB]) + symidx;
|
||||||
i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
|
i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
|
||||||
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
|
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
|
||||||
/* Keep track of the symbol index. */
|
|
||||||
symidx = n;
|
|
||||||
|
|
||||||
while (i--)
|
while (i--)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user