From 60bb3e188c65ddc1bfa92c716c1ef87277fac38b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 26 Jul 1999 08:27:39 +0000 Subject: [PATCH] * sysdeps/m68k/dl-machine.h (RTLD_START): Call pre-init funtions. --- sysdeps/m68k/dl-machine.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index f9f9bf7..e3ebca5 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -181,6 +181,20 @@ _dl_start_user: 0: | Push the searchlist of the main object as argument in | the _dl_init_next call below. move.l ([_dl_main_searchlist@GOT.w, %a5]), %d2 + | First dun the pre-initializers. +0: move.l %d2, -(%sp) + | Call _dl_preinit_next to return the address of an pre-initializer + | function to run. + bsr.l _dl_preinit_next@PLTPC + add.l #4, %sp | Pop argument. + | Check for zero return, when out of pre-initializers. + tst.l %d0 + jeq 0f + | Call the shared object pre-initializer function. + move.l %d0, %a0 + jsr (%a0) + | Loop to call _dl_preinit_next for the next pre-initializer. + jra 0b 0: move.l %d2, -(%sp) | Call _dl_init_next to return the address of an initializer | function to run. -- 2.7.4