pe-x86-64.exp 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Expect script for ELF tests with pe-x86-64 inputs.
  2. # Copyright (C) 2020-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. # Only for Linux/x86-64.
  22. if {![istarget "x86_64-*-linux*"] } {
  23. return
  24. }
  25. run_ld_link_tests [list \
  26. [list \
  27. "Build pe-x86-64-1" \
  28. "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \
  29. "" \
  30. "" \
  31. {pe-x86-64-1a.obj.bz2 pe-x86-64-1b.obj.bz2 pe-x86-64-1c.obj.bz2} \
  32. {{objdump {-dw --sym} pe-x86-64-1.od}} \
  33. "pe-x86-64-1" \
  34. ] \
  35. [list \
  36. "Build pe-x86-64-2" \
  37. "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \
  38. "" \
  39. "" \
  40. {pe-x86-64-2a.obj.bz2 pe-x86-64-2b.obj.bz2 pe-x86-64-2c.obj.bz2} \
  41. {{objdump {-dw --sym} pe-x86-64-2.od}} \
  42. "pe-x86-64-2" \
  43. ] \
  44. [list \
  45. "Build pe-x86-64-3" \
  46. "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \
  47. "" \
  48. "" \
  49. {pe-x86-64-3a.obj.bz2 pe-x86-64-3b.obj.bz2 pe-x86-64-3c.obj.bz2 \
  50. pe-x86-64-3d.obj.bz2 } \
  51. {{objdump {-dw --sym} pe-x86-64-3.od}} \
  52. "pe-x86-64-3" \
  53. ] \
  54. [list \
  55. "Build pe-x86-64-4" \
  56. "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \
  57. "" \
  58. "" \
  59. {pe-x86-64-4a.obj.bz2 pe-x86-64-4b.obj.bz2 pe-x86-64-4c.obj.bz2 \
  60. pe-x86-64-4d.obj.bz2 } \
  61. {{objdump {-dw --sym} pe-x86-64-4.od}} \
  62. "pe-x86-64-4" \
  63. ] \
  64. [list \
  65. "Build pe-x86-64-5" \
  66. "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \
  67. "" \
  68. "" \
  69. {pe-x86-64-5.obj.bz2 } \
  70. {{objdump {-dw --sym} pe-x86-64-5.od} \
  71. {readelf {-s -x .data} pe-x86-64-5.rd}} \
  72. "pe-x86-64-5" \
  73. ] \
  74. [list \
  75. "Build pe-x86-64-6" \
  76. "-m elf_x86_64 --entry=main -z max-page-size=0x1000 -z separate-code" \
  77. "" \
  78. "" \
  79. {pe-x86-64-6.obj.bz2 } \
  80. {{objdump {-dw --sym} pe-x86-64-6.od}} \
  81. "pe-x86-64-6" \
  82. ] \
  83. ]