s390.em 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # This shell script emits a C file. -*- C -*-
  2. # Copyright (C) 2017-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; see the file COPYING3. If not,
  18. # see <http://www.gnu.org/licenses/>.
  19. #
  20. # This file is sourced from elf-generic.em, and defines S/390
  21. # specific routines.
  22. #
  23. fragment <<EOF
  24. #include "ldctor.h"
  25. #include "elf-s390.h"
  26. static struct s390_elf_params params = { 0 };
  27. /* This is a convenient point to tell BFD about target specific flags.
  28. After the output has been created, but before inputs are read. */
  29. static void
  30. s390_elf_create_output_section_statements (void)
  31. {
  32. if (!bfd_elf_s390_set_options (&link_info, &params))
  33. einfo (_("%F%P: can not init BFD: %E\n"));
  34. }
  35. EOF
  36. # Define some shell vars to insert bits of code into the standard elf
  37. # parse_args and list_options functions.
  38. #
  39. PARSE_AND_LIST_PROLOGUE='
  40. #define OPTION_PGSTE 301
  41. '
  42. PARSE_AND_LIST_LONGOPTS='
  43. { "s390-pgste", no_argument, NULL, OPTION_PGSTE},
  44. '
  45. PARSE_AND_LIST_OPTIONS='
  46. fprintf (file, _(" --s390-pgste Tell the kernel to "
  47. "allocate 4k page tables\n"));
  48. '
  49. PARSE_AND_LIST_ARGS_CASES='
  50. case OPTION_PGSTE:
  51. params.pgste = 1;
  52. break;
  53. '
  54. LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=s390_elf_create_output_section_statements