svn commit: trunk/uClibc/ldso/ldso

sjhill at uclibc.org sjhill at uclibc.org
Sun Nov 6 00:17:56 UTC 2005


Author: sjhill
Date: 2005-11-05 16:17:48 -0800 (Sat, 05 Nov 2005)
New Revision: 12167

Log:
Do not set the RELOCS_DONE flag until it is actually done. This order matters for NPTL libpthreads to work. Well, that was a nice waste of 3 hours.


Modified:
   trunk/uClibc/ldso/ldso/dl-elf.c


Changeset:
Modified: trunk/uClibc/ldso/ldso/dl-elf.c
===================================================================
--- trunk/uClibc/ldso/ldso/dl-elf.c	2005-11-05 20:56:29 UTC (rev 12166)
+++ trunk/uClibc/ldso/ldso/dl-elf.c	2005-11-06 00:17:48 UTC (rev 12167)
@@ -654,7 +654,6 @@
 #endif
 	if (tpnt->dynamic_info[DT_RELOC_TABLE_ADDR] &&
 	    !(tpnt->init_flag & RELOCS_DONE)) {
-		tpnt->init_flag |= RELOCS_DONE;
 		reloc_addr = tpnt->dynamic_info[DT_RELOC_TABLE_ADDR];
 		relative_count = tpnt->dynamic_info[DT_RELCONT_IDX];
 		if (relative_count) { /* Optimize the XX_RELATIVE relocations if possible */
@@ -665,6 +664,7 @@
 		goof += _dl_parse_relocation_information(rpnt,
 				reloc_addr,
 				reloc_size);
+		tpnt->init_flag |= RELOCS_DONE;
 	}
 	if (tpnt->dynamic_info[DT_BIND_NOW])
 		now_flag = RTLD_NOW;
@@ -672,7 +672,6 @@
 	    (!(tpnt->init_flag & JMP_RELOCS_DONE) ||
 	     (now_flag && !(tpnt->rtld_flags & now_flag)))) {
 		tpnt->rtld_flags |= now_flag; 
-		tpnt->init_flag |= JMP_RELOCS_DONE;
 		if (!(tpnt->rtld_flags & RTLD_NOW)) {
 			_dl_parse_lazy_relocation_information(rpnt,
 					tpnt->dynamic_info[DT_JMPREL],
@@ -682,6 +681,7 @@
 					tpnt->dynamic_info[DT_JMPREL],
 					tpnt->dynamic_info[DT_PLTRELSZ]);
 		}
+		tpnt->init_flag |= JMP_RELOCS_DONE;
 	}
 	return goof;
 }




More information about the uClibc-cvs mailing list