Subversion Repositories Kolibri OS

Rev

Rev 8959 | Rev 9080 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8959 Rev 9075
Line 366... Line 366...
366
 
366
 
Line 367... Line 367...
367
		Symbol sym = cdict_CStr_Symbol_get_v(&ir->symtab, name);
367
		Symbol sym = cdict_CStr_Symbol_get_v(&ir->symtab, name);
368
 
368
 
369
		if (sym.sym.symbol.SectionNumber == 0xffff ||
369
		if (sym.sym.symbol.SectionNumber == 0xffff ||
-
 
370
			sym.sym.symbol.SectionNumber == 0xfffe ||
-
 
371
			(sym.sym.symbol.StorageClass != 2 &&  // Not an external symbol
370
			sym.sym.symbol.SectionNumber == 0xfffe ||
372
			 sym.sym.symbol.StorageClass != 3 &&  // Not a static symbol
371
			(sym.sym.symbol.StorageClass != 2 && sym.sym.symbol.StorageClass != 3)) {
373
			 sym.sym.symbol.StorageClass != 6)) { // Not a label
372
			fwrite(&sym.sym.symbol, 1, 18, out);
374
			fwrite(&sym.sym.symbol, 1, 18, out);
373
		} else {
375
		} else {
Line 413... Line 415...
413
			}
415
			}
Line 414... Line 416...
414
 
416
 
Line 415... Line 417...
415
			sym.sym.symbol.Value += section_offset;
417
			sym.sym.symbol.Value += section_offset;
416
 
418
 
417
			if (strlen(sym.name) <= 8) {
419
			if (strlen(sym.name) <= 8) {
418
				strcpy(sym.sym.symbol.ShortName, sym.name);
420
				memcpy(sym.sym.symbol.ShortName, sym.name, 8);
419
			} else {
421
			} else {
420
				sym.sym.symbol.Zeroes = 0;
422
				sym.sym.symbol.Zeroes = 0;
Line 593... Line 595...
593
			printf("   Name:                      %s\n", name);
595
			printf("   Name:                      %s\n", name);
594
			printf("   Virtual Address:           %u\n", sh.VirtualAddress);
596
			printf("   Virtual Address:           %u\n", sh.VirtualAddress);
595
			printf("   Characteristics:           %08x\n", sh.Characteristics);
597
			printf("   Characteristics:           %08x\n", sh.Characteristics);
596
			printf("   Offset in the big section: %u\n", objects[i].section_offsets[sec_i]);
598
			printf("   Offset in the big section: %u\n", objects[i].section_offsets[sec_i]);
597
			printf("  }\n");
599
			printf("  }\n");
-
 
600
 
-
 
601
			if (sh.VirtualAddress != 0) {
-
 
602
				printf("\n\n\n\n");
-
 
603
				for (int i = 0; i < 42; i++) {
-
 
604
					printf("!!!");
-
 
605
				}
-
 
606
				printf("\n\n\n\n\nWARNING: Handling of section with Virtual Address another that 0 is not implemented\n\n\n\n\n");
-
 
607
				for (int i = 0; i < 42; i++) {
-
 
608
					printf("!!!");
-
 
609
				}
-
 
610
				printf("\n\n\n\n");
-
 
611
			}
598
		}
612
		}
599
		printf(" }\n");
613
		printf(" }\n");
600
		printf("}\n");
614
		printf("}\n");
601
	}
615
	}