t_ps1.pas 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {
  2. Copyright (c) 2024 by Kirill Kranz
  3. This unit implements support link routines
  4. for the (MIPSEL) PS1 target
  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 of the License, or
  8. (at your option) 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
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. unit t_ps1;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. link;
  23. type
  24. TLinkerPS1=class(TExternalLinker)
  25. private
  26. Function WriteResponseFile(isdll:boolean) : Boolean;
  27. public
  28. constructor Create;override;
  29. procedure SetDefaultInfo;override;
  30. function MakeExecutable:boolean;override;
  31. procedure InitSysInitUnitName; override;
  32. end;
  33. implementation
  34. uses
  35. SysUtils,
  36. cutils,cfileutl,cclasses,
  37. verbose,systems,globtype,globals,
  38. fmodule,
  39. aasmbase,
  40. ogelf,owar,
  41. i_ps1
  42. ;
  43. Constructor TLinkerPS1.Create;
  44. begin
  45. Inherited Create;
  46. end;
  47. procedure TLinkerPS1.SetDefaultInfo;
  48. begin
  49. with Info do
  50. begin
  51. ExeCmd[1]:= 'ld $OPT $RES';
  52. end;
  53. end;
  54. Function TLinkerPS1.WriteResponseFile(isdll: boolean): Boolean;
  55. begin
  56. result:= True;
  57. end;
  58. function TLinkerPS1.MakeExecutable: boolean;
  59. begin
  60. result:= true;
  61. end;
  62. procedure TLinkerPS1.InitSysInitUnitName;
  63. begin
  64. sysinitunit:='si_prc';
  65. end;
  66. initialization
  67. RegisterLinker(ld_ps1, TLinkerPS1);
  68. RegisterTarget(system_mipsel_ps1_info);
  69. end.