aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mips
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-04-15 03:45:32 +0000
committerAndreas Jaeger <aj@suse.de>2000-04-15 03:45:32 +0000
commitfe81e98863567979207535d9968e13e63e52cc53 (patch)
treef930f140f3cd58a2133759b8fc133869135a5204 /sysdeps/mips
parentc8c73ac377bb1295c588b8a2b52a38f82ece8b48 (diff)
downloadglibc-fe81e98863567979207535d9968e13e63e52cc53.tar
glibc-fe81e98863567979207535d9968e13e63e52cc53.tar.gz
glibc-fe81e98863567979207535d9968e13e63e52cc53.tar.bz2
glibc-fe81e98863567979207535d9968e13e63e52cc53.zip
Update.
* sysdeps/mips/dl-machine.h (elf_machine_got_rel): Initialize symidx correctly. * sysdeps/mips/add_n.S: Use __PIC__, add .end directive.
Diffstat (limited to 'sysdeps/mips')
-rw-r--r--sysdeps/mips/add_n.S7
-rw-r--r--sysdeps/mips/dl-machine.h73
2 files changed, 39 insertions, 41 deletions
diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S
index df32eecfcf..aa94c1d001 100644
--- a/sysdeps/mips/add_n.S
+++ b/sysdeps/mips/add_n.S
@@ -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 \ No newline at end of file
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 0d971e23d0..5c628ce187 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -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--)
{