arclinux.em 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # This shell script emits a C file. -*- C -*-
  2. # Copyright (C) 2007 Free Software Foundation, Inc.
  3. #
  4. # Copyright 2008-2012 Synopsys Inc.
  5. #
  6. # This file is part of GLD, the Gnu Linker.
  7. #
  8. # This program is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 2 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  21. # MA 02110-1301, USA.
  22. # This file is sourced from elf32.em, and defines extra arc-linux
  23. # specific routines.
  24. #
  25. cat >>e${EMULATION_NAME}.c <<EOF
  26. extern char * init_str;
  27. extern char * fini_str;
  28. EOF
  29. PARSE_AND_LIST_PROLOGUE='
  30. #define OPTION_INIT 300+1
  31. #define OPTION_FINI (OPTION_INIT+1)
  32. '
  33. PARSE_AND_LIST_LONGOPTS='
  34. /* PE options */
  35. { "init", required_argument, NULL, OPTION_INIT },
  36. { "fini", required_argument, NULL, OPTION_FINI },
  37. '
  38. # FIXME: Should set PARSE_AND_LIST_OPTIONS to provide a short description
  39. # of the options.
  40. PARSE_AND_LIST_ARGS_CASES='
  41. case OPTION_FINI:
  42. fini_str = optarg;
  43. break;
  44. case OPTION_INIT:
  45. init_str = optarg;
  46. break;
  47. '