LinkDLLUnit.pas 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {
  2. TIGCC IDE
  3. Copyright (C) 2000-2004 Sebastian Reichelt
  4. Copyright (C) 2005 Kevin Kofler
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software Foundation,
  15. Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  16. }
  17. unit LinkDLLUnit;
  18. interface
  19. uses
  20. Classes;
  21. const
  22. LinkLibCurInterfaceVersion = 17;
  23. llcdTI92 = $01;
  24. llcdTI89 = $02;
  25. llcdTI92Plus = $04;
  26. llcdV200 = $08;
  27. llcdFlagTitanium = $100;
  28. llffTIOS = 0;
  29. llffTIOSUpgrade = 1;
  30. llffGDBCOFF = 2;
  31. llfrMain = 0;
  32. llfrData = 1;
  33. llfrDebuggingInfo = 2;
  34. llmtError = 0;
  35. llmtWarning = 1;
  36. type
  37. TLinkLibDestFile = packed record
  38. Data: Pointer;
  39. end;
  40. TLinkLibDataVarInfo = packed record
  41. VarName: PChar;
  42. CreateCopy,
  43. CopyOnlyIfArchived: WordBool;
  44. end;
  45. TLinkLibOptimizeInfo = packed record
  46. RemoveUnused,
  47. OptimizeRelocs,
  48. OptimizeNOPs,
  49. OptimizeReturns,
  50. OptimizeBranches,
  51. OptimizeMoves,
  52. OptimizeTests,
  53. OptimizeCalcs,
  54. UseFLineJumps,
  55. Use4ByteFLineJumps,
  56. CutRanges,
  57. ReorderSections,
  58. MergeConstants: WordBool;
  59. ProgramSize,
  60. DataSize,
  61. BSSSize,
  62. RelocCount,
  63. NativeRelocCount,
  64. OptimizeBranchesResult,
  65. OptimizeMovesResult,
  66. OptimizeTestsResult,
  67. OptimizeCalcsResult,
  68. UseFLineJumpsResult,
  69. CutRangesResult,
  70. NearAssemblyResult: LongInt;
  71. end;
  72. PCharArray = array [0..MaxListSize-1] of PChar;
  73. PPChar = ^PCharArray;
  74. TLinkLibGetInterfaceVersion = function: LongInt; cdecl;
  75. TLinkLibGetOutputFile = function (var DestFile: TLinkLibDestFile; FileSize, DestCalc, FileRole, FileFormat, FileType: LongInt; Extension: PChar; Executable: WordBool; var EffectiveSize: LongInt): WordBool; cdecl;
  76. TLinkLibFinalizeOutputFile = procedure (var DestFile: TLinkLibDestFile); cdecl;
  77. TLinkLibError = procedure (FileName, Text: PChar; MessageType: LongInt); cdecl;
  78. TLinkLibLinkFiles = function (ObjectFiles, ArchiveFiles: PPChar; ErrorMessage: TLinkLibError; GetOutputFile: TLinkLibGetOutputFile; FinalizeOutputFile: TLinkLibFinalizeOutputFile; NativeMode, FlashOS, Fargo: WordBool; var DataVarInfo: TLinkLibDataVarInfo; var OptimizeInfo: TLinkLibOptimizeInfo; OmitBSSInitialization: WordBool): ShortInt; cdecl;
  79. TLinkLibCreateArchive = function (DestFile: PChar; ObjectFiles: PPChar; ErrorMessage: TLinkLibError; NoNames: WordBool): ShortInt; cdecl;
  80. implementation
  81. end.