Message-ID: <04a201c0f542$28184620$056aaac0@kjlin> From: "kjlin" Subject: How to trigger a binary to excute in Linux/MIPS? Date: Fri, 15 Jun 2001 10:23:04 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_049F_01C0F585.29803F20" Sender: owner-linux-mips@oss.sgi.com To: linux-mips@oss.sgi.com Message-ID: <20010615022304._7ju-7iEWfDDljibHGSsCkYduce4ye6P-DC3ONFSuKo@z> This is a multi-part message in MIME format. ------=_NextPart_000_049F_01C0F585.29803F20 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Hi, To execute a program, the load_elf_binary() loads it and descdes the = value of elf_entry, start_code, start_data....etc.. Then , the start_thread(regs, elf_entry, bprm->p) will trigger it. But it just sets up the value of regs->cp0_status, regs->cp0_epc, = regs->regs[29] and current->thread.current_ds. Why can the start_thread() trigger a program? Here is my situation : The kernel boots up and mounts the filesystem, when it tries to execute /sbin/hello i don't see any output. (Ps: /sbin/hello is a simple testing program to replace the real = /sbin/init. It just outputs some console message.) I looked at the memory and the code for hello is present at "elf_entry", so why does the start_thread not execute it ?? Any help would be really appreciated. Thanks, KJ ------=_NextPart_000_049F_01C0F585.29803F20 Content-Type: text/html; charset="big5" Content-Transfer-Encoding: quoted-printable
Hi,
 
To execute a program, the load_elf_binary() loads it = and=20 descdes the value of elf_entry, start_code, = start_data....etc..
Then , the start_thread(regs, elf_entry, bprm->p) = will=20 trigger it.
But it just sets up the value of=20 regs->cp0_status, regs->cp0_epc, regs->regs[29] and=20 current->thread.current_ds.
Why can the start_thread() trigger a = program?
 
Here is my situation :
The kernel boots up and mounts the filesystem, when = it tries=20 to
execute /sbin/hello i don't see any output.
(Ps: /sbin/hello is a simple testing program to = replace the=20 real /sbin/init.
        It just = outputs=20 some console message.)
I looked at the memory and the code = for hello is=20 present at "elf_entry",
so why does the start_thread not execute it = ??
 
Any help would be really = appreciated.
Thanks,
KJ

------=_NextPart_000_049F_01C0F585.29803F20--