Changeset 14609
- Timestamp:
- Jan 30, 2011, 12:39:44 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/source/lisp-kernel/mach-o-image.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/lisp-kernel/mach-o-image.c
r14608 r14609 83 83 if (n < 0) { 84 84 perror("reading from image"); 85 exit(1);85 _exit(1); 86 86 } 87 87 if (n == 0) { 88 88 fprintf(stderr, "unexpected end of file reading image\n"); 89 exit(1);89 _exit(1); 90 90 } 91 91 total += n; … … 108 108 if (n < 0) { 109 109 perror("writing to image"); 110 exit(1);110 _exit(1); 111 111 } 112 112 total += n; … … 307 307 f; 308 308 int tag; 309 natural size_in_bytes ;309 natural size_in_bytes, code_words; 310 310 macho_nlist symbol; 311 311 … … 330 330 #ifdef X8632 331 331 f = ((LispObj)start)+fulltag_misc; 332 size_in_bytes = (header_element_count(header)<<node_shift)-tag_misc; 332 code_words = (unsigned short)deref(f,1); 333 if (code_words & 0x8000) { 334 code_words = header_element_count(header) - (code_words & 0x7fff); 335 } 336 size_in_bytes = (code_words<<node_shift)-tag_misc; 333 337 #endif 334 338 #ifdef X8664 335 339 f = ((LispObj)start)+fulltag_function; 336 size_in_bytes = (header_element_count(header)<<node_shift)-tag_function; 340 code_words = (int)deref(f,1); 341 size_in_bytes = (code_words<<node_shift)-tag_function; 337 342 #endif 338 343 … … 484 489 485 490 seg = add_macho_segment(p, 486 " READONLY",491 "__TEXT", 487 492 (natural)(readonly_area->low-4096), 488 493 4096+align_to_power_of_2(readonly_area->active-readonly_area->low,12), … … 492 497 VM_PROT_READ|VM_PROT_EXECUTE, 493 498 1, 494 " purespace");499 "text"); 495 500 init_macho_section(seg, 496 501 0, … … 827 832 managed_static_area = new_area(ms_start,ms_end,AREA_MANAGED_STATIC); 828 833 managed_static_area->active = ms_end; 834 add_area_holding_area_lock(managed_static_area); 829 835 lisp_global(REF_BASE) = (LispObj) ms_start; 830 836
Note:
See TracChangeset
for help on using the changeset viewer.
