[uClibc-cvs] uClibc/ldso/ldso/mips elfinterp.c,1.7,1.8

Erik Andersen andersen at uclibc.org
Thu Jan 29 12:18:55 UTC 2004


Update of /var/cvs/uClibc/ldso/ldso/mips
In directory nail:/tmp/cvs-serv13904/ldso/mips

Modified Files:
	elfinterp.c 
Log Message:
Modify interfaces for _dl_parse_relocation_information()
_dl_parse_lazy_relocation_information() and _dl_parse_copy_information()
so they are all consistant, allowing for future consolidation.

Trim some trailing whitespace as well.


Index: elfinterp.c
===================================================================
RCS file: /var/cvs/uClibc/ldso/ldso/mips/elfinterp.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- elfinterp.c	22 Aug 2003 07:04:16 -0000	1.7
+++ elfinterp.c	29 Jan 2004 12:18:52 -0000	1.8
@@ -48,9 +48,9 @@
 static const char *
 _dl_reltypes(int type)
 {
-  static char buf[22];  
+  static char buf[22];
   const char *str;
-  
+
   if (type >= (int)(sizeof (_dl_reltypes_tab)/sizeof(_dl_reltypes_tab[0])) ||
       NULL == (str = _dl_reltypes_tab[type]))
   {
@@ -59,7 +59,7 @@
   return str;
 }
 
-static 
+static
 void debug_sym(Elf32_Sym *symtab,char *strtab,int symtab_index)
 {
   if(_dl_debug_symbols)
@@ -84,7 +84,7 @@
     const char *sym;
     symtab_index = ELF32_R_SYM(rpnt->r_info);
     sym = symtab_index ? strtab + symtab[symtab_index].st_name : "sym=0x0";
-    
+
   if(_dl_debug_symbols)
 	  _dl_dprintf(_dl_debug_file, "\n\t");
   else
@@ -130,16 +130,16 @@
 
 	new_addr = (unsigned long) _dl_find_hash(strtab + sym->st_name,
 		 tpnt->symbol_scope, tpnt, resolver);
-	 
+
 	/* Address of jump instruction to fix up */
-	instr_addr = (unsigned long) (got + local_gotno + sym_index - gotsym); 
+	instr_addr = (unsigned long) (got + local_gotno + sym_index - gotsym);
 	got_addr = (char **) instr_addr;
-	 
+
 #if defined (__SUPPORT_LD_DEBUG__)
 	if (_dl_debug_bindings)
 	{
 		_dl_dprintf(_dl_debug_file, "\nresolve function: %s", symname);
-		if(_dl_debug_detail) _dl_dprintf(_dl_debug_file, 
+		if(_dl_debug_detail) _dl_dprintf(_dl_debug_file,
 				"\n\tpatched %x ==> %x @ %x\n", *got_addr, new_addr, got_addr);
 	}
 	if (!_dl_debug_nofixups) {
@@ -152,22 +152,22 @@
 	return new_addr;
 }
 
-void _dl_parse_lazy_relocation_information(struct elf_resolve *tpnt, 
+void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
 	unsigned long rel_addr, unsigned long rel_size, int type)
 {
 	/* Nothing to do */
-	return;
+	return 0;
 }
 
-int _dl_parse_copy_information(struct dyn_elf *xpnt, unsigned long rel_addr, 
-	unsigned long rel_size, int type)
+int _dl_parse_copy_information(struct dyn_elf *rpnt,
+	unsigned long rel_addr, unsigned long rel_size, int type)
 {
 	/* Nothing to do */
 	return 0;
 }
 
 
-int _dl_parse_relocation_information(struct elf_resolve *tpnt, 
+int _dl_parse_relocation_information(struct dyn_elf *rpnt,
 	unsigned long rel_addr, unsigned long rel_size, int type)
 {
 	Elf32_Sym *symtab;
@@ -177,6 +177,7 @@
 	unsigned long *reloc_addr=NULL, old_val=0;
 	unsigned long symbol_addr;
 	int i, reloc_type, symtab_index;
+	struct elf_resolve *tpnt = rpnt->dyn;
 
 	/* Now parse the relocation information */
 	rel_size = rel_size / sizeof(Elf32_Rel);
@@ -232,7 +233,7 @@
 				_dl_dprintf(2, "can't handle reloc type %s\n ", _dl_reltypes(reloc_type));
 #else
 				_dl_dprintf(2, "can't handle reloc type %x\n", reloc_type);
-#endif			
+#endif
 				_dl_exit(1);
 			}
 		};




More information about the uClibc-cvs mailing list