elf.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /* Definitions of target machine for gcc for Renesas / SuperH SH using ELF.
  2. Copyright (C) 1996-2015 Free Software Foundation, Inc.
  3. Contributed by Ian Lance Taylor <ian@cygnus.com>.
  4. This file is part of GCC.
  5. GCC 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 3, or (at your option)
  8. any later version.
  9. GCC 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 GCC; see the file COPYING3. If not see
  15. <http://www.gnu.org/licenses/>. */
  16. /* Let sh.c know this is ELF. */
  17. #undef TARGET_ELF
  18. #define TARGET_ELF 1
  19. /* Generate DWARF2 debugging information and make it the default. */
  20. #define DWARF2_DEBUGGING_INFO 1
  21. #undef PREFERRED_DEBUGGING_TYPE
  22. #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
  23. /* Use a more compact format for line information. */
  24. #define DWARF2_ASM_LINE_DEBUG_INFO 1
  25. #undef WCHAR_TYPE
  26. /* #define WCHAR_TYPE (TARGET_SH5 ? "int" : "long int") */
  27. #define WCHAR_TYPE SH_ELF_WCHAR_TYPE
  28. #undef WCHAR_TYPE_SIZE
  29. #define WCHAR_TYPE_SIZE 32
  30. /* The prefix to add to user-visible assembler symbols. */
  31. #undef LOCAL_LABEL_PREFIX
  32. #define LOCAL_LABEL_PREFIX "."
  33. #undef SIZE_TYPE
  34. #define SIZE_TYPE (TARGET_SH5 ? "long unsigned int" : "unsigned int")
  35. #undef PTRDIFF_TYPE
  36. #define PTRDIFF_TYPE (TARGET_SH5 ? "long int" : "int")
  37. /* Pass -ml and -mrelax to the assembler and linker. */
  38. #undef ASM_SPEC
  39. #define ASM_SPEC SH_ASM_SPEC
  40. #undef LINK_SPEC
  41. #define LINK_SPEC SH_LINK_SPEC
  42. #undef LINK_EMUL_PREFIX
  43. #if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN
  44. #define LINK_EMUL_PREFIX "sh%{!mb:l}elf"
  45. #else
  46. #define LINK_EMUL_PREFIX "sh%{ml:l}elf"
  47. #endif
  48. #define DBX_REGISTER_NUMBER(REGNO) SH_DBX_REGISTER_NUMBER (REGNO)
  49. #undef ASM_GENERATE_INTERNAL_LABEL
  50. #define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
  51. sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM))
  52. #define DBX_LINES_FUNCTION_RELATIVE 1
  53. #define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
  54. #undef STARTFILE_SPEC
  55. #define STARTFILE_SPEC \
  56. "%{!shared: crt1.o%s} crti.o%s \
  57. %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
  58. #undef ENDFILE_SPEC
  59. #define ENDFILE_SPEC \
  60. "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
  61. #undef LIB_SPEC
  62. #define LIB_SPEC "-lc"
  63. /* ASM_OUTPUT_CASE_LABEL is defined in elfos.h. With it,
  64. a redundant .align was generated. */
  65. #undef ASM_OUTPUT_CASE_LABEL