Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linuxÖÐELF¼ÓÔعý³Ì·ÖÎö

sys_execve
   | - do_execve
|
| - search_binary_handler         
           |- linux_binfmt= elf_format
       |- elf_format-> load_elf_binary
| - elf_entry = load_elf_interp()
          |-   
| if  (BAD_ADDR(elf_entry))
                |     force_sig(SIGSEGV, current);
|     retval =-EINVAL;
 
  
binfmt_elf.c: line 1024
              elf_entry = loc->elf_ex.e_entry;
              if (BAD_ADDR(elf_entry)) {
                     force_sig(SIGSEGV, current);
                     retval = -EINVAL;
                     goto out_free_dentry;
              }
 
ELF¿ÉÐеµµÄÔØÈ룺
 
ÄÚºËÖÐʵ¼ÊÖ´ÐÐ
execv()
»ò
execve()
ϵͳµ÷ÓõijÌÐòÊÇ
do_execve()
£¬Õâ¸öº¯ÊýÏÈ´ò¿ªÄ¿±êÓ³ÏñÎļþ£¬²¢´ÓÄ¿±êÎļþµÄÍ·²¿
(
´ÓµÚÒ»¸ö×Ö½Ú¿ªÊ¼
)
¶ÁÈëÈô¸É
(128)
×Ö½Ú£¬È»ºóµ÷ÓÃÁíÒ»¸öº¯Êý
search_binary_handler()
£¬ÔÚÄÇÀïÃæÈø÷ÖÖ¿ÉÖ´ÐгÌÐòµÄ´¦Àí³ÌÐòÇ°À´ÈÏÁìºÍ´¦Àí¡£ÄÚºËËùÖ§³ÖµÄÿÖÖ¿ÉÖ´ÐгÌÐò¶¼Óиö
struct linux_binfmt
Êý¾Ý½á¹¹£¬Í¨¹ýÏòÄں˵ǼǹÒÈëÒ»¸ö¶ÓÁС£¶ø
search_binary_handler()
£¬ÔòɨÃèÕâ¸ö¶ÓÁУ¬Èø÷¸öÊý¾Ý½á¹¹ËùÌṩµÄ´¦Àí³ÌÐò¡¢¼´¸÷ÖÖÓ³Ïñ¸ñʽ¡¢ÖðһǰÀ´ÈÏÁì¡£Èç¹ûij¸ö¸ñʽµÄ´¦Àí³ÌÐò·¢ÏÖÌØÕ÷Ïà·û¶ø£¬±ãÖ´ÐиøñʽӳÏñµÄ×°ÈëºÍÆô¶¯¡£
ÎÒÃÇ´Ó
ELF
¸ñʽӳÏñµÄ


Ïà¹ØÎĵµ£º

linuxÄÚºËÖÐ×î³£¼ûµÄËøÊÇ×ÔÐýËø

 linuxÄÚºËÖÐ×î³£¼ûµÄËøÊÇ×ÔÐýËø(spin lock)¡£×ÔÐýËø×î¶àÖ»Äܱ»Ò»¸ö¿ÉÖ´ÐÐÏ̳߳ÖÓС£Èç¹ûÒ»¸öÖ´ÐÐÏß³ÌÊÔͼ»ñµÃÒ»¸ö±»ÕùÓõÄ×ÔÐýËø£¬ÄÇô¸ÃÏ߳̾ͻáÒ»Ö±½øÐÐæѭ»·µÈ´ýËøÖØпÉÓá£ÒªÊÇËøδ±»ÕùÓã¬ÇëÇóËøµÄÖ´ÐÐÏ̱߳ãÄÜÁ¢¿ÌµÃµ½Ëü£¬¼ÌÐøÖ´ÐС£ÔÚÈÎÒâʱ¼ä£¬×ÔÐýËø¶¼¿ÉÒÔ·ÀÖ¹¶àÓÚÒ»¸öµÄÖ´ÐÐÏß³Ìͬʱ½øÈëÁÙ½çÇø¡£
  ......

LINUX°²×°JDK1.6¹¥ÂÔ

 ÍøÉÏÕÒÁ˺ܶ࣬Õâ¸ö×îÓÐЧ£¬×ªÔØÏÂ
ÏÂÔسɹ¦ºóÉÏ´«ÖÁ·þÎñÆ÷ÈÎÒâĿ¼
        2. ÔÚµ±Ç°Ä¿Â¼ÊäÈë
        sh jdk-6u2-linux-i586-rpm.bin
        3.¿´µ½ °²×°³ÌÐòÔÚѯÎÊÄúÊÇ·ñ×ðÊØÐí¿ÉЭÒéÒ³Ãæ ,»Ø³µ ......

ÔÚLinuxÏÂÓÃbuildroot´î½¨mips/armµÄ½»²æ±àÒëƽ̨

 ÔÚLinuxÏÂÓÃbuildroot´î½¨mips/armµÄ½»²æ±àÒëƽ̨
Õâ¸ö±àÒë»·¾³ÊDz»ÄܱàÒëfor¿ªÔ´ÎÞÏß·ÓÉÆ÷µÄ³ÌÐòµÄ£¬ÒòΪÄÚºËÊÇ2.6µÄ
½¨Òé²Î¿¼Õâƪ: http://www.felix021.com/blog/read.php?1467
Ç°Á½ÌìÂòÁËNetGear WRT614 V9£¬´îÔصÄÊÇBroadcomµÄ200MHz MIPS´¦ÀíÆ÷¡£
ÓÉÓÚʹÓõÄÊÇ¿ªÔ´²Ù×÷ϵͳLinux£¬ËùÒÔ¿ÉÒÔË¢ÍøÉÏһЩNBµÄ ......

Linux Shell

 ShellÊÇϵͳµÄÓû§½çÃ棬ÌṩÁËÓû§ÓëÄں˽øÐн»»¥²Ù×÷µÄÒ»ÖÖ½Ó¿Ú¡£Ëü½ÓÊÕÓû§ÊäÈëµÄÃüÁî²¢°ÑËüËÍÈëÄÚºËÈ¥Ö´ÐС£
¡¡¡¡Êµ¼ÊÉÏShellÊÇÒ»¸öÃüÁî½âÊÍÆ÷£¬Ëü½âÊÍÓÉÓû§ÊäÈëµÄÃüÁî²¢ÇÒ°ÑËüÃÇË͵½Äںˡ£²»½öÈç´Ë£¬ShellÓÐ×Ô¼ºµÄ±à³ÌÓïÑÔÓÃÓÚ¶ÔÃüÁîµÄ±à¼­£¬ËüÔÊÐíÓû§±àдÓÉshellÃüÁî×é³ÉµÄ³ÌÐò¡£Shell±à³ÌÓïÑÔ¾ßÓÐÆÕͨ±à³ÌÓ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ