dataSegPad.c
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:1k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* dataSegPad.c - padding for beginning of data segment */
  2. /* Copyright 1984-1991 Wind River Systems, Inc. */
  3. #include "copyright_wrs.h"
  4. /*
  5. modification history
  6. --------------------
  7. 01c,19oct92,jcf  change to include when INCLUDE_MMU_FULL defined.
  8. 01b,28jul92,rdc  changed PAGE_SIZE to VM_PAGE_SIZE.
  9. 01a,21jul92,rdc  written.
  10. */
  11. /*
  12. DESCRIPTION
  13. This module conditionally creates a data structure the size of one page;
  14. it is explicility listed as the first module on the load line when VxWorks
  15. is linked to insure that this data structure is the first item in the
  16. data segment.  This mechanism is needed to insure that the data segment
  17. does not overlap a page that is occupied by the text segment;  when text
  18. segment protection is turned on, all pages that contain text are write 
  19. protected.  This insures that the data segment does not lie in a page that
  20. has been write protected.  If text segment protection has not been included,
  21. this module compiles into a null object module.  In an embedded system, this
  22. mechanism may not be needed if the loader explicitly places the data segment
  23. in a section of memory seperate from the text segment.
  24. */
  25. #include "vxWorks.h"
  26. #include "config.h"
  27. #ifdef INCLUDE_MMU_FULL /* bootroms will not ref dataSegPad.o */
  28. char dataSegPad [VM_PAGE_SIZE] = {1};
  29. #endif /* INCLUDE_MMU_FULL */