亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? unexhp9k800.c

?? 早期freebsd實(shí)現(xiàn)
?? C
字號(hào):
/* Unexec for HP 9000 Series 800 machines.   Bob Desinger <hpsemc!bd@hplabs.hp.com>   Note that the GNU project considers support for HP operation a   peripheral activity which should not be allowed to divert effort   from development of the GNU system.  Changes in this code will be   installed when users send them in, but aside from that we don't   plan to think about it, or about whether other Emacs maintenance   might break it.  Unexec creates a copy of the old a.out file, and replaces the old data  area with the current data area.  When the new file is executed, the  process will see the same data structures and data values that the  original process had when unexec was called.    Unlike other versions of unexec, this one copies symbol table and  debug information to the new a.out file.  Thus, the new a.out file  may be debugged with symbolic debuggers.    If you fix any bugs in this, I'd like to incorporate your fixes.  Send them to uunet!hpda!hpsemc!jmorris or jmorris%hpsemc@hplabs.HP.COM.    CAVEATS:  This routine saves the current value of all static and external  variables.  This means that any data structure that needs to be  initialized must be explicitly reset.  Variables will not have their  expected default values.    Unfortunately, the HP-UX signal handler has internal initialization  flags which are not explicitly reset.  Thus, for signals to work in  conjunction with this routine, the following code must executed when  the new process starts up.    void _sigreturn();  ...  sigsetreturn(_sigreturn);*/#include <stdio.h>#include <fcntl.h>#include <errno.h>#include <a.out.h>#define NBPG 2048#define roundup(x,n) ( ( (x)+(n-1) ) & ~(n-1) )  /* n is power of 2 */#define min(x,y)  ( ((x)<(y))?(x):(y) )/* Create a new a.out file, same as old but with current data space */unexec(new_name, old_name, new_end_of_text, dummy1, dummy2)     char new_name[];		/* name of the new a.out file to be created */     char old_name[];		/* name of the old a.out file */     char *new_end_of_text;	/* ptr to new edata/etext; NOT USED YET */     int dummy1, dummy2;	/* not used by emacs */{  int old, new;  int old_size, new_size;  struct header hdr;  struct som_exec_auxhdr auxhdr;    /* For the greatest flexibility, should create a temporary file in     the same directory as the new file.  When everything is complete,     rename the temp file to the new name.     This way, a program could update its own a.out file even while     it is still executing.  If problems occur, everything is still     intact.  NOT implemented.  */    /* Open the input and output a.out files */  old = open(old_name, O_RDONLY);  if (old < 0)    { perror(old_name); exit(1); }  new = open(new_name, O_CREAT|O_RDWR|O_TRUNC, 0777);  if (new < 0)    { perror(new_name); exit(1); }    /* Read the old headers */  read_header(old, &hdr, &auxhdr);    /* Decide how large the new and old data areas are */  old_size = auxhdr.exec_dsize;  new_size = sbrk(0) - auxhdr.exec_dmem;    /* Copy the old file to the new, up to the data space */  lseek(old, 0, 0);  copy_file(old, new, auxhdr.exec_dfile);    /* Skip the old data segment and write a new one */  lseek(old, old_size, 1);  save_data_space(new, &hdr, &auxhdr, new_size);    /* Copy the rest of the file */  copy_rest(old, new);    /* Update file pointers since we probably changed size of data area */  update_file_ptrs(new, &hdr, &auxhdr, auxhdr.exec_dfile, new_size-old_size);    /* Save the modified header */  write_header(new, &hdr, &auxhdr);    /* Close the binary file */  close(old);  close(new);  exit(0);}/* Save current data space in the file, update header.  */save_data_space(file, hdr, auxhdr, size)     int file;     struct header *hdr;     struct som_exec_auxhdr *auxhdr;     int size;{  /* Write the entire data space out to the file */  if (write(file, auxhdr->exec_dmem, size) != size)    { perror("Can't save new data space"); exit(1); }    /* Update the header to reflect the new data size */  auxhdr->exec_dsize = size;  auxhdr->exec_bsize = 0;}/* Update the values of file pointers when something is inserted.  */update_file_ptrs(file, hdr, auxhdr, location, offset)     int file;     struct header *hdr;     struct som_exec_auxhdr *auxhdr;     unsigned int location;     int offset;{  struct subspace_dictionary_record subspace;  int i;    /* Increase the overall size of the module */  hdr->som_length += offset;    /* Update the various file pointers in the header */#define update(ptr) if (ptr > location) ptr = ptr + offset  update(hdr->aux_header_location);  update(hdr->space_strings_location);  update(hdr->init_array_location);  update(hdr->compiler_location);  update(hdr->symbol_location);  update(hdr->fixup_request_location);  update(hdr->symbol_strings_location);  update(hdr->unloadable_sp_location);  update(auxhdr->exec_tfile);  update(auxhdr->exec_dfile);    /* Do for each subspace dictionary entry */  lseek(file, hdr->subspace_location, 0);  for (i = 0; i < hdr->subspace_total; i++)    {      if (read(file, &subspace, sizeof(subspace)) != sizeof(subspace))	{ perror("Can't read subspace record"); exit(1); }            /* If subspace has a file location, update it */      if (subspace.initialization_length > 0 	  && subspace.file_loc_init_value > location)	{	  subspace.file_loc_init_value += offset;	  lseek(file, -sizeof(subspace), 1);	  if (write(file, &subspace, sizeof(subspace)) != sizeof(subspace))	    { perror("Can't update subspace record"); exit(1); }	}    }     /* Do for each initialization pointer record */  /* (I don't think it applies to executable files, only relocatables) */#undef update}/* Read in the header records from an a.out file.  */read_header(file, hdr, auxhdr)     int file;     struct header *hdr;     struct som_exec_auxhdr *auxhdr;{    /* Read the header in */  lseek(file, 0, 0);  if (read(file, hdr, sizeof(*hdr)) != sizeof(*hdr))    { perror("Couldn't read header from a.out file"); exit(1); }    if (hdr->a_magic != EXEC_MAGIC && hdr->a_magic != SHARE_MAGIC      &&  hdr->a_magic != DEMAND_MAGIC)    {      fprintf(stderr, "a.out file doesn't have legal magic number\n");       exit(1);      }    lseek(file, hdr->aux_header_location, 0);  if (read(file, auxhdr, sizeof(*auxhdr)) != sizeof(*auxhdr))    {      perror("Couldn't read auxiliary header from a.out file");      exit(1);    }  }/* Write out the header records into an a.out file.  */write_header(file, hdr, auxhdr)     int file;     struct header *hdr;     struct som_exec_auxhdr *auxhdr;{  /* Update the checksum */  hdr->checksum = calculate_checksum(hdr);    /* Write the header back into the a.out file */  lseek(file, 0, 0);  if (write(file, hdr, sizeof(*hdr)) != sizeof(*hdr))    { perror("Couldn't write header to a.out file"); exit(1); }  lseek(file, hdr->aux_header_location, 0);  if (write(file, auxhdr, sizeof(*auxhdr)) != sizeof(*auxhdr))    { perror("Couldn't write auxiliary header to a.out file"); exit(1); }}/* Calculate the checksum of a SOM header record. */calculate_checksum(hdr)     struct header *hdr;{  int checksum, i, *ptr;    checksum = 0;  ptr = (int *) hdr;    for (i=0; i<sizeof(*hdr)/sizeof(int)-1; i++)    checksum ^= ptr[i];    return(checksum);}/* Copy size bytes from the old file to the new one.  */copy_file(old, new, size)     int new, old;     int size;{  int len;  int buffer[8196];  /* word aligned will be faster */    for (; size > 0; size -= len)    {      len = min(size, sizeof(buffer));      if (read(old, buffer, len) != len)	{ perror("Read failure on a.out file"); exit(1); }      if (write(new, buffer, len) != len)	{ perror("Write failure in a.out file"); exit(1); }    }}/* Copy the rest of the file, up to EOF.  */copy_rest(old, new)     int new, old;{  int buffer[4096];  int len;    /* Copy bytes until end of file or error */  while ( (len = read(old, buffer, sizeof(buffer))) > 0)    if (write(new, buffer, len) != len) break;    if (len != 0)    { perror("Unable to copy the rest of the file"); exit(1); }}#ifdef	DEBUGdisplay_header(hdr, auxhdr)     struct header *hdr;     struct som_exec_auxhdr *auxhdr;{  /* Display the header information (debug) */  printf("\n\nFILE HEADER\n");  printf("magic number %d \n", hdr->a_magic);   printf("text loc %.8x   size %d \n", auxhdr->exec_tmem, auxhdr->exec_tsize);  printf("data loc %.8x   size %d \n", auxhdr->exec_dmem, auxhdr->exec_dsize);  printf("entry     %x \n",   auxhdr->exec_entry);  printf("Bss  segment size %u\n", auxhdr->exec_bsize);  printf("\n");  printf("data file loc %d    size %d\n",	 auxhdr->exec_dfile, auxhdr->exec_dsize);  printf("som_length %d\n", hdr->som_length);  printf("unloadable sploc %d    size %d\n",	 hdr->unloadable_sp_location, hdr->unloadable_sp_size);}#endif /* DEBUG */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产乱码久久久久久浪潮 | 在线亚洲一区二区| 国产丝袜美腿一区二区三区| 欧美bbbbb| 精品视频一区二区不卡| 亚洲精品国产a| 91啪亚洲精品| 亚洲日本一区二区三区| 99久久综合色| 国产精品久久免费看| 国产99精品视频| 国产女人aaa级久久久级 | 色菇凉天天综合网| 亚洲欧美日韩国产综合| 91在线精品一区二区| 亚洲欧美自拍偷拍| 91香蕉视频mp4| 伊人一区二区三区| 欧美做爰猛烈大尺度电影无法无天| 亚洲男人的天堂一区二区| 91在线播放网址| 亚洲精品免费看| 色999日韩国产欧美一区二区| 亚洲欧美激情小说另类| 在线观看免费一区| 五月天国产精品| 欧美一区二区三区视频免费播放 | 一区二区三区.www| 欧美三级电影网| 偷拍一区二区三区四区| 欧美日韩国产123区| 青青青伊人色综合久久| 日韩精品一区二区三区视频在线观看 | 成人免费毛片app| 欧美激情一区二区在线| jizzjizzjizz欧美| 一区二区在线观看不卡| 欧美日韩国产高清一区| 久久99国产精品麻豆| 国产亚洲综合性久久久影院| 不卡视频在线观看| 亚洲午夜在线观看视频在线| 欧美女孩性生活视频| 久久国产视频网| 中文字幕欧美区| 在线精品视频一区二区| 蜜臀精品一区二区三区在线观看 | 亚洲高清一区二区三区| 日韩欧美的一区| 国产激情一区二区三区四区| 亚洲色大成网站www久久九九| 欧美午夜免费电影| 久久99久久久欧美国产| 国产精品久久久久久久久免费丝袜| 色婷婷综合久久久中文字幕| 日韩国产高清在线| 国产香蕉久久精品综合网| 色婷婷精品久久二区二区蜜臀av | 全部av―极品视觉盛宴亚洲| 国产欧美日韩在线| 欧洲另类一二三四区| 精东粉嫩av免费一区二区三区| 中文字幕精品在线不卡| 91福利视频网站| 国产一区美女在线| 亚洲精品久久久久久国产精华液| 欧美一区二区网站| 成人黄色在线看| 日韩电影在线免费观看| 国产亚洲福利社区一区| 欧美日韩一区三区| 国产精品一二二区| 亚洲超碰精品一区二区| 国产日韩欧美综合一区| 欧美唯美清纯偷拍| 国产高清精品网站| 午夜精品福利一区二区三区av| 久久久久9999亚洲精品| 欧美综合天天夜夜久久| 国产激情一区二区三区桃花岛亚洲| 亚洲成人午夜影院| 国产女人18毛片水真多成人如厕| 欧美日韩精品一区二区三区蜜桃 | 国产精品国产三级国产aⅴ入口 | 日韩一卡二卡三卡四卡| 成人18精品视频| 美女网站色91| 一区二区欧美精品| 国产女人aaa级久久久级| 日韩一区二区视频| 色婷婷av一区| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 日本vs亚洲vs韩国一区三区| 综合在线观看色| 久久青草欧美一区二区三区| 欧美日韩一级黄| 99r国产精品| 国产又粗又猛又爽又黄91精品| 亚洲国产一区二区a毛片| 国产精品激情偷乱一区二区∴| 精品三级在线看| 欧美日韩你懂得| 色综合视频在线观看| 丁香桃色午夜亚洲一区二区三区| 蜜臀av一级做a爰片久久| 亚洲一区在线观看免费 | 国产性色一区二区| 欧美va天堂va视频va在线| 精品视频在线看| 日本韩国一区二区三区| 成人av资源在线| 国产成人在线视频免费播放| 美女视频一区在线观看| 五月婷婷激情综合网| 亚洲自拍与偷拍| 亚洲精品网站在线观看| 国产精品久久久久久久岛一牛影视 | 丝袜美腿亚洲一区| 亚洲综合视频网| 亚洲男同性恋视频| 国产精品成人一区二区三区夜夜夜 | 国产午夜精品福利| 精品剧情在线观看| 日韩欧美中文字幕公布| 欧美一区二区黄| 91精品国产91综合久久蜜臀| 欧美日韩二区三区| 欧美日韩一区不卡| 欧美影院一区二区| 欧美偷拍一区二区| 欧美日韩高清一区二区| 欧美电影在线免费观看| 欧美另类变人与禽xxxxx| 欧美日韩一区二区三区在线看| 在线亚洲一区二区| 在线看日本不卡| 欧美亚洲日本一区| 欧美三级资源在线| 欧美亚洲国产一区在线观看网站 | 99精品久久只有精品| av在线不卡网| 99国产精品国产精品毛片| 91色.com| 欧美亚洲一区三区| 91精品国产一区二区| 欧美一区二区三区视频免费| 精品日韩一区二区三区免费视频| 精品少妇一区二区三区在线视频| 精品福利一二区| 国产欧美一区二区精品性色| 国产精品女同互慰在线看| 亚洲色图欧洲色图婷婷| 一区二区三区成人在线视频| 亚洲成人先锋电影| 久久99在线观看| 成人永久看片免费视频天堂| 91无套直看片红桃| 欧美日韩国产经典色站一区二区三区 | 日韩午夜激情视频| 精品国产髙清在线看国产毛片| 久久久国产精品午夜一区ai换脸| 国产精品美女久久久久高潮| 玉米视频成人免费看| 日本亚洲最大的色成网站www| 久久99精品国产.久久久久久 | 美女视频网站黄色亚洲| 国产99久久久久| 91日韩一区二区三区| 69精品人人人人| 久久久国产一区二区三区四区小说| 国产精品久久久久一区二区三区 | 中文字幕在线观看一区| 亚洲一区二区三区四区在线| 蜜臀久久99精品久久久画质超高清| 国产激情一区二区三区| 在线观看日产精品| 欧美sm极限捆绑bd| 亚洲欧洲美洲综合色网| 天天色 色综合| 国产乱码精品一区二区三区忘忧草 | 久久在线观看免费| 中文字幕亚洲视频| 亚洲国产美女搞黄色| 精品一区二区在线观看| 99国产精品久久久久久久久久久| 欧美绝品在线观看成人午夜影视| 久久麻豆一区二区| 亚洲国产精品影院| 国产美女视频91| 欧美优质美女网站| 2023国产精品自拍| 亚洲自拍偷拍九九九| 国产乱码一区二区三区| 欧美三级中文字幕在线观看| 国产日本欧美一区二区| 亚洲无人区一区| 久久不见久久见免费视频7| aaa欧美色吧激情视频| 日韩三级高清在线| 亚洲美女偷拍久久|