home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / programm / programi / gcc_9112.lzh / hunk2gcc / README < prev   
Encoding:
Text File  |  1991-10-09  |  3.5 KB  |  79 lines

  1. Although I always said, I'll never provide BLINK support for gnu-ld, I sort
  2. of did now. This converter (hunk2gcc) allows you to
  3.   o  convert object files in hunk form into a.out object files
  4.   o  convert ALINK style (ie. concatenated) libraries into a collection of 
  5.      a.out files, that you later can move into an archive with `ar'
  6.  
  7. Since I don't yet have a 3rd edition of the AmigaDOS manual (sigh, I wonder
  8. whether our dear book stores manage to get a copy still this year;-() I
  9. didn't have documentation for the new hunk types dealing with base relative
  10. addressing.  I tried to implement them based on how the non base relative
  11. types work, don't know if I did it right.  It's not that bad if it's done
  12. wrong for the moment, since ld doesn't yet know how to deal with base
  13. relative symbols anyway;-)
  14.  
  15. I wrote this converter mainly because I didn't like the idea of
  16. disassembling and reassembling amiga.lib, and I really wanted to use those
  17. commodities support functions;-) I tested the converter on amiga.lib, and
  18. (besides generating huge disk traffic...) it seemed to work, at least those
  19. programs I used the library with seem to work as they should.
  20.  
  21. However, I really don't have the necessary amount of object files and
  22. libraries in this format to decide whether I missed one or two cases, so 
  23. please tell me about bugs you find.
  24.  
  25. For the new HUNK_INDEX and HUNK_LIB types:  I asked a friend (that
  26. amazingly got his copy of the 3rd edition somewhere from outer space I
  27. guess;-)) just how I should skip them cleanly..  It turned out that those
  28. hunks are not just additions to the existing hunks, they really replace the
  29. old style hunks, and I just didn't see a reason why I should support this
  30. ugly (IMHO) construction, overall librarians that generate such libraries
  31. should be able to generate oldstyle ALINK libraries as well.
  32.  
  33.  
  34. How to use this tool
  35. --------------------
  36. Best thing is, make a new directory where you want your converted object
  37. files to go, cd into it, and enter
  38.  
  39.   hunk2gcc commo:amiga.lib [..further libs if you like..]
  40.  
  41. This generats an a.out object file for every program unit present in the
  42. hunk file (in this case, from amiga.lib).
  43.  
  44. I first wanted to use the name of the program unit for the name of the
  45. object file, but soon saw that those names are rarely to never useful, they
  46. often aren't even set, and sometimes (hi SAS..) even contain `.c' names,
  47. not right what you usually want as object file;-) Names that are used now
  48. start with `obj.', followed by a serial number, followed by a pattern
  49. built from the task address, such that the generated name is unique and
  50. doesn't overwrite any existing file. 
  51.  
  52. As the final step convert all those files into an a.out style library by
  53. issuing:
  54.  
  55.   ar rs libamiga.a obj.*
  56.  
  57. This also builds a symbol table in the archive, and makes accesses to the
  58. library much faster (same effect as running ranlib on the library
  59. afterwards).
  60.  
  61. If you just want to convert a single object file, you might give it a
  62. nicer name after the conversion ;-)
  63.  
  64.  
  65. So...  all you SAS users, switching to gcc was never easier!  You can still
  66. use your libraries, just take the large-model/non-regpar libraries, convert
  67. them with oml into oldstyle libraries or just extract all files and run
  68. hunk2gcc over them with `hunk2gcc *'.  You can then start to use the new
  69. driver that calls ld instead of ln (or blink, if you used the BuRP driver),
  70. and got your proper gcc environment.
  71.  
  72.  
  73. HAVE FUN!
  74.  
  75. Markus Wild
  76.  
  77. PS: Please read the header of hunk2gcc.c for copyright/disclaimer.
  78.     You can reach me at `wild@nessie.cs.id.ethz.ch'.
  79.