vxworks.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # If you change this file, please also look at files which source this one:
  2. # armelf_vxworks.sh elf32ebmipvxworks.sh elf32elmipvxworks.sh
  3. # elf_i386_vxworks.sh elf32ppcvxworks.sh elf32_sparc_vxworks.sh
  4. # shelf_vxworks.sh
  5. # The Diab tools use a different init/fini convention. Initialization code
  6. # is place in sections named ".init$NN". These sections are then concatenated
  7. # into the .init section. It is important that .init$00 be first and .init$99
  8. # be last. The other sections should be sorted, but the current linker script
  9. # parse does not seem to allow that with the SORT keyword in this context.
  10. INIT_START='_init = .;
  11. KEEP (*(.init$00));
  12. KEEP (*(.init$0[1-9]));
  13. KEEP (*(.init$[1-8][0-9]));
  14. KEEP (*(.init$9[0-8]));'
  15. INIT_END='KEEP (*(.init$99));'
  16. FINI_START='_fini = .;
  17. KEEP (*(.fini$00));
  18. KEEP (*(.fini$0[1-9]));
  19. KEEP (*(.fini$[1-8][0-9]));
  20. KEEP (*(.fini$9[0-8]));'
  21. FINI_END="KEEP (*(.fini\$99));
  22. PROVIDE (${SYMPREFIX}_etext = .);"
  23. OTHER_READWRITE_SECTIONS=".tls_data ${RELOCATING-0} : {${RELOCATING+
  24. __wrs_rtp_tls_data_start = .;
  25. ___wrs_rtp_tls_data_start = .;}
  26. *(.tls_data${RELOCATING+ .tls_data.*})
  27. }${RELOCATING+
  28. __wrs_rtp_tls_data_size = . - __wrs_rtp_tls_data_start;
  29. ___wrs_rtp_tls_data_size = . - __wrs_rtp_tls_data_start;
  30. __wrs_rtp_tls_data_align = ALIGNOF(.tls_data);
  31. ___wrs_rtp_tls_data_align = ALIGNOF(.tls_data);}
  32. .tls_vars ${RELOCATING-0} : {${RELOCATING+
  33. __wrs_rtp_tls_vars_start = .;
  34. ___wrs_rtp_tls_vars_start = .;}
  35. *(.tls_vars${RELOCATING+ .tls_vars.*})
  36. }${RELOCATING+
  37. __wrs_rtp_tls_vars_size = SIZEOF(.tls_vars);
  38. ___wrs_rtp_tls_vars_size = SIZEOF(.tls_vars);}"
  39. TEXT_START_ADDR="(DEFINED (__wrs_rtp_base) ? __wrs_rtp_base : 0)"
  40. ETEXT_NAME=etext_unrelocated
  41. OTHER_END_SYMBOLS="PROVIDE (${SYMPREFIX}_ehdr = ${TEXT_START_ADDR});"
  42. DATA_END_SYMBOLS=".edata : { PROVIDE (${SYMPREFIX}_edata = .); }"
  43. VXWORKS_BASE_EM_FILE=$EXTRA_EM_FILE
  44. EXTRA_EM_FILE=vxworks
  45. unset EMBEDDED