Browse Source

Pass _dl_fini function ptr to __uClibc_start_main().

To actually use it, one must define _DL_DO_FINI_IN_LIBC globally.
That will also break ABI for apps linked with previous version of crtX.S.
They must be relinked with this version to work again.
Joakim Tjernlund 20 years ago
parent
commit
2d31c8c2c6
1 changed files with 1 additions and 0 deletions
  1. 1 0
      libc/sysdeps/linux/powerpc/crt0.S

+ 1 - 0
libc/sysdeps/linux/powerpc/crt0.S

@@ -70,6 +70,7 @@ _start:
 	addi	r5,r5,1
 	addi	r5,r5,1
 	rlwinm	r5,r5,2,0,29
 	rlwinm	r5,r5,2,0,29
 	add	r5,r5,r4
 	add	r5,r5,r4
+	mr	r8,r7 /* Pass _dl_fini from ldso */
 	/* Ok, now run uClibc's main() -- shouldn't return */
 	/* Ok, now run uClibc's main() -- shouldn't return */
 #if (defined L_crt1 || defined L_Scrt1) && defined __UCLIBC_CTOR_DTOR__
 #if (defined L_crt1 || defined L_Scrt1) && defined __UCLIBC_CTOR_DTOR__
 # ifdef L_Scrt1
 # ifdef L_Scrt1