bfin.em 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # This shell script emits a C file. -*- C -*-
  2. # Copyright (C) 2010-2022 Free Software Foundation, Inc.
  3. #
  4. # This file is part of the GNU Binutils.
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  19. # MA 02110-1301, USA.
  20. #
  21. # This file is sourced from elf.em, and defines extra bfin-elf
  22. # specific routines.
  23. #
  24. fragment <<EOF
  25. #include "elf-bfd.h"
  26. #include "elf32-bfin.h"
  27. /* Whether to put code in Blackfin L1 SRAM. */
  28. extern bool elf32_bfin_code_in_l1;
  29. /* Whether to put (writable) data in Blackfin L1 SRAM. */
  30. extern bool elf32_bfin_data_in_l1;
  31. EOF
  32. # Define some shell vars to insert bits of code into the standard elf
  33. # parse_args and list_options functions.
  34. #
  35. PARSE_AND_LIST_PROLOGUE='
  36. #define OPTION_CODE_IN_L1 300
  37. #define OPTION_DATA_IN_L1 301
  38. '
  39. PARSE_AND_LIST_LONGOPTS='
  40. { "code-in-l1", no_argument, NULL, OPTION_CODE_IN_L1 },
  41. { "data-in-l1", no_argument, NULL, OPTION_DATA_IN_L1 },
  42. '
  43. PARSE_AND_LIST_OPTIONS='
  44. fprintf (file, _("\
  45. --code-in-l1 Put code in L1\n"));
  46. fprintf (file, _("\
  47. --data-in-l1 Put data in L1\n"));
  48. '
  49. PARSE_AND_LIST_ARGS_CASES='
  50. case OPTION_CODE_IN_L1:
  51. elf32_bfin_code_in_l1 = true;
  52. break;
  53. case OPTION_DATA_IN_L1:
  54. elf32_bfin_data_in_l1 = true;
  55. break;
  56. '