Explorar o código

Revert "Make ELF constructors/destructors work"

This reverts commit fe76d597a9b85f8af55235dd41722abf8fe63ca1.
Nigel Croxon hai 1 ano
pai
achega
bbc2b528e0
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      lib/entry.c

+ 4 - 4
lib/entry.c

@@ -24,13 +24,13 @@ static void ctors(void)
 {
 	for (funcp *location = (void *)&_init_array; location < (funcp *)&_init_array_end; location++) {
 		funcp func = *location;
-		if (func != NULL)
+		if (location != NULL)
 			func();
 	}
 
 	for (funcp *location = (void *)&__CTOR_LIST__; location < (funcp *)&__CTOR_END__; location++) {
 		funcp func = *location;
-		if (func != NULL)
+		if (location != NULL)
 			func();
 	}
 }
@@ -39,13 +39,13 @@ static void dtors(void)
 {
 	for (funcp *location = (void *)&__DTOR_LIST__; location < (funcp *)&__DTOR_END__; location++) {
 		funcp func = *location;
-		if (func != NULL)
+		if (location != NULL)
 			func();
 	}
 
 	for (funcp *location = (void *)&_fini_array; location < (funcp *)&_fini_array_end; location++) {
 		funcp func = *location;
-		if (func != NULL)
+		if (location != NULL)
 			func();
 	}
 }