imageInfo.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /***************************************************************************
  2. * 中航工业计算所 版权所有
  3. * Copyright (C) 2011 AVIC ACTRI Inc. All Rights Reserved.
  4. ***************************************************************************/
  5. /************************头 文 件*******************************************/
  6. #include <sysImage.h>
  7. /************************宏 定 义*******************************************/
  8. /************************类型定义******************************************/
  9. typedef struct
  10. {
  11. T_ImageHeadInfo imgHead;
  12. UINT8 arch[10];
  13. }IMG_INFO;
  14. /***********************外部变量声明****************************************/
  15. extern T_CHAR _code_start[];
  16. extern T_CHAR _code_size[];
  17. extern T_CHAR load__code_start[];
  18. extern T_CHAR _data_start[];
  19. extern T_CHAR _data_size[];
  20. extern T_CHAR load__data_start[];
  21. extern T_CHAR _bss_start[];
  22. extern T_CHAR _bss_size[];
  23. extern T_CHAR load__bss_start[];
  24. extern unsigned long o2m_symbol_table[];
  25. /************************全局变量******************************/
  26. IMG_INFO _imgHeader __attribute__((__section__(".__ImageInfo"))) =
  27. {
  28. {
  29. "os", /*映像名*/
  30. "version1", /*映像版本*/
  31. 3, /*段总数*/
  32. 0xAA55AA55, /*魔数,用于判断映像是否存在*/
  33. o2m_symbol_table,
  34. /* 映像段 */
  35. {
  36. {COS_IMG_SECTION_TEXT,(ULONG)load__code_start,(ULONG)_code_start,(ULONG)_code_size},
  37. {COS_IMG_SECTION_DATA,(ULONG)load__data_start,(ULONG)_data_start,(ULONG)_data_size},
  38. {COS_IMG_SECTION_BSS,(ULONG)load__bss_start,(ULONG)_bss_start,(ULONG)_bss_size},
  39. }
  40. },
  41. "arm"/* 体系结构*/
  42. };