mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-18 12:16:13 +08:00
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.
This commit is contained in:
parent
8cacb29129
commit
127035bb55
@ -1,7 +1,7 @@
|
||||
/* MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and
|
||||
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.
|
||||
|
||||
@ -28,12 +28,12 @@ MA 02111-1307, USA. */
|
||||
s2_ptr $6
|
||||
size $7
|
||||
*/
|
||||
#ifdef PIC
|
||||
#ifdef __PIC__
|
||||
.option pic2
|
||||
#endif
|
||||
ENTRY (__mpn_add_n)
|
||||
.set noreorder
|
||||
#ifdef PIC
|
||||
#ifdef __PIC__
|
||||
.cpload t9
|
||||
#endif
|
||||
.set nomacro
|
||||
@ -119,3 +119,4 @@ ENTRY (__mpn_add_n)
|
||||
sw $11,0($4)
|
||||
j $31
|
||||
or $2,$2,$8
|
||||
.end __mpn_add_n
|
@ -126,6 +126,8 @@ elf_machine_load_address (void)
|
||||
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. */
|
||||
static inline struct link_map *
|
||||
@ -476,9 +478,6 @@ elf_machine_lazy_rel (struct link_map *map,
|
||||
/* 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. */
|
||||
static inline void
|
||||
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
|
||||
# define RESOLVE_GOTSYM(sym,sym_index) 0
|
||||
#else
|
||||
/* FIXME: The macro RESOLVE_GOTSYM is not handling versioning. */
|
||||
# define RESOLVE_GOTSYM(sym,sym_index) \
|
||||
({ \
|
||||
const ElfW(Sym) *ref = sym; \
|
||||
ElfW(Addr) value; \
|
||||
\
|
||||
switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \
|
||||
{ \
|
||||
default: \
|
||||
{ \
|
||||
const ElfW(Half) *vernum = \
|
||||
(const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); \
|
||||
ElfW(Half) ndx = vernum[sym_index]; \
|
||||
const struct r_found_version *version = &l->l_versions[ndx]; \
|
||||
\
|
||||
if (version->hash != 0) \
|
||||
{ \
|
||||
value = _dl_lookup_versioned_symbol(strtab + sym->st_name, \
|
||||
map, \
|
||||
&ref, scope, version, \
|
||||
R_MIPS_REL32); \
|
||||
break; \
|
||||
} \
|
||||
/* Fall through. */ \
|
||||
} \
|
||||
case 0: \
|
||||
value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \
|
||||
scope, R_MIPS_REL32); \
|
||||
} \
|
||||
\
|
||||
(ref)? value + ref->st_value: 0; \
|
||||
# define RESOLVE_GOTSYM(sym,sym_index) \
|
||||
({ \
|
||||
const ElfW(Sym) *ref = sym; \
|
||||
ElfW(Addr) value; \
|
||||
\
|
||||
switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \
|
||||
{ \
|
||||
default: \
|
||||
{ \
|
||||
const ElfW(Half) *vernum = \
|
||||
(const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); \
|
||||
ElfW(Half) ndx = vernum[sym_index]; \
|
||||
const struct r_found_version *version = &l->l_versions[ndx]; \
|
||||
\
|
||||
if (version->hash != 0) \
|
||||
{ \
|
||||
value = _dl_lookup_versioned_symbol(strtab + sym->st_name,\
|
||||
map, \
|
||||
&ref, scope, version, \
|
||||
R_MIPS_REL32); \
|
||||
break; \
|
||||
} \
|
||||
/* Fall through. */ \
|
||||
} \
|
||||
case 0: \
|
||||
value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \
|
||||
scope, R_MIPS_REL32); \
|
||||
} \
|
||||
\
|
||||
(ref)? value + ref->st_value: 0; \
|
||||
})
|
||||
#endif /* RTLD_BOOTSTRAP */
|
||||
|
||||
@ -541,12 +539,11 @@ elf_machine_got_rel (struct link_map *map, int lazy)
|
||||
|
||||
/* Handle global got entries. */
|
||||
got += n;
|
||||
sym = (void *) D_PTR (map, l_info[DT_SYMTAB]);
|
||||
sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
|
||||
/* Keep track of the symbol index. */
|
||||
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
|
||||
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
|
||||
/* Keep track of the symbol index. */
|
||||
symidx = n;
|
||||
|
||||
while (i--)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user