README 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. Oberon Microsystems BlackBox Component Builder (http://www.oberon.ch/)
  2. Port for OpenBSD/i386, GNU/Linux/i386
  3. Tested on OpenBSD 5.2, Fedora Core 17, Ubuntu 12.04 LTS
  4. Some significant parts taken from OpenBUGS (http://www.openbugs.info/)
  5. How to build:
  6. compile loader executable (BlackBox itself and simple interpreter):
  7. `uname -s`/libBB0.so must be present (can be built from Windows)
  8. cd BlackBox/`uname -s`/Lin/Rsrc/loader; make
  9. compile self:
  10. cd BlackBox; ./switch-os `uname -s`; ./clean; ./build-dev0; ./build
  11. Files:
  12. original:
  13. BlackBox:
  14. Dev/Mod/*
  15. all except ElfLinker16
  16. Dev/Rsrc/*
  17. Docu/BB-License.odc
  18. Docu/BB-Licensing-Policy.odc
  19. Docu/BB-Open-Source-License.odc
  20. Obx/*
  21. Std/*
  22. System/Mod/
  23. all except Console
  24. System/Rsrc/*
  25. Text/*
  26. Xhtml
  27. Windows/Host/Mod/Files.odc (HostFiles)
  28. Windows/Host/Mod/Registry.odc (HostRegistry)
  29. OpenBUGS:
  30. Dev/Mod/ElfLinker16.odc
  31. Dev/Docu/ElfLinker.odc
  32. System/Mod/Console.odc
  33. Docu/OpenBUGS-License.odc
  34. http://forum.oberoncore.ru/viewtopic.php?f=34&t=1159&sid=3e82517160caa46c64331178c1b61e95:
  35. {Linux,OpenBSD}/Lin/Mod/Kernel_so_init.odc
  36. modified:
  37. OpenBSD/System/Mod/Kernel.odc:
  38. 1.6-rc6 System/Mod/Kernel.odc, OpenBUGS Lin/Mod/linKernel.odc:
  39. OpenBSD specific:
  40. Memory management rewritten (based on mmap)
  41. Kernel.TrapHandler
  42. OpenBSD sigcontext-specific
  43. Kernel.Time
  44. CLOCKS_PER_SEC related
  45. Kernel.InitModule
  46. mprotect call added
  47. Kernel.InstallSignals:
  48. do not install signal handler for SIGTHR (when executable linked with -pthread)
  49. IsReadable
  50. Kernel.cmdLine support:
  51. Kernel.INIT (SetCmdLine2)
  52. Linux/System/Mod/Kernel.odc:
  53. OpenBSD/System/Mod/Kernel.odc modified for Linux:
  54. Time*
  55. TrapHandler
  56. mmap: use "/dev/zero" device instead of -1
  57. mprotect addresses must be page-aligned
  58. do not show warning message if signal install failed
  59. OpenBSD/Host/Mod/Files.odc:
  60. OpenBUGS Lin/Mod/linHostFiles.odc:
  61. OpenBSD-specific:
  62. size_t
  63. __xstat -> stat
  64. Kernel.cmdLine support:
  65. str := "" -> str := Kernel.cmdLine$
  66. Linux/Host/Mod/Files.odc:
  67. OpenBUGS Lin/Mod/linHostFiles.odc:
  68. Kernel.cmdLine support:
  69. str := "" -> str := Kernel.cmdLine$
  70. OpenBSD/Host/Mod/Console.odc:
  71. OpenBUGS Lin/Mod/Console.odc:
  72. stdin -> SYSTEM.ADR(__sF[0])
  73. Linux/Host/Mod/Console.odc:
  74. OpenBUGS Lin/Mod/Console.odc
  75. Windows/Host/Mod/Console.odc:
  76. OpenBUGS Lin/Mod/Console.odc ported to Windows
  77. OpenBSD/Lin/Mod/Libc.txt:
  78. OpenBUGS Lin/Mod/Libc.odc:
  79. OpenBSD-specific
  80. Linux/Lin/Mod/Libc.odc:
  81. OpenBUGS Lin/Mod/Libc.odc:
  82. PROT_*, MAP_*, O_*, _SC_PAGESIZE, SIGSTKSZ CONSTs added
  83. open, close, read, write, mmap, munmap, mprotect, getenv, sysconf, sigaltstack functions added
  84. Linux/Lin/Mod/Dl.odc:
  85. OpenBUGS Lin/Mod/Dl.odc
  86. Linux/Host/Mod/Dates.odc: from http://oberoncore.ru/
  87. OpenBSD/Host/Mod/Dates.odc:
  88. Linux/Host/Mod/Dates.odc: OpenBSD-specific
  89. Windows/Host/Mod/Dates.odc:
  90. BlackBox 1.6-rc6 DatesHook from HostDialog
  91. Dev0/Mod
  92. CP*
  93. BlackBox 1.6-rc6 Dev CP* modified to not depend on Dates, Texts etc.
  94. Compiler.odc:
  95. modified original BlackBox Dev/Mod/Compiler.odc
  96. Linker.odc:
  97. modified original BlackBox Dev/Mod/Linker.odc
  98. ElfLinker16.odc:
  99. modified OpenBUGS Dev/Mod/ElfLinker16.odc
  100. HostTextConv.odc:
  101. BlackBox 1.6-rc6 Host/Mod/TextConv.odc:
  102. Windows-specific converters removed
  103. new:
  104. Cons/Mod
  105. Interp.odc: console interpreter
  106. Compiler.odc: console interface to Dev compiler
  107. Log.odc: Log.Hook console implementation
  108. {OpenBSD,Linux}/libBB.so: compiled and linked shared library to run BlackBox
  109. {OpenBSD,Linux}/libBB0.so: compiled and linked shared library to run simple development interpreter
  110. Windows/dev0.exe: compiled and linked simple development interpreter
  111. Views.odc: minimal Views implementation required to compile StdInterpreter
  112. HostFonts.odc, HostDialog.odc, HostWindows.odc: simple Hosts implementation
  113. Notes:
  114. Dev0:
  115. I will not remove Dev0 because I can not link .so library based on ConsInterp and Dev
  116. Kernel.baseStack issue (preliminary description):
  117. baseStack is upper border:
  118. * of garbage collector stack scan range (see Kernel.MarkLocals)
  119. * of TrapViewer stack show range (see Kernel.TrapHandler)
  120. it is initialized in Kernel.INIT and initially points close to upper
  121. border of library stack (because Kernel.INIT called from library
  122. constructor, which executes close to upper border of library stack)
  123. it can be changed in Kernel.Start to skip unnecessary stack addresses
  124. if libBB.so exports procedure for calling from main program,
  125. then it will be executed on main program stack, not on library
  126. stack, at stack addresses higher than baseStack.
  127. Thus, MarkLocals and TrapViewer will work incorrectly.
  128. in this case, to solve problem, baseStack should be adjusted and
  129. should point to stack on which this exported procedure executes
  130. if necessary, this can be done using auxiliary module Kernel_so_init
  131. A. V. Shiryaev, 2012