0008-remove_BFD_VMA_FMT.patch 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. diff -Nur elf2flt-v2021.08.orig/elf2flt.c elf2flt-v2021.08/elf2flt.c
  2. --- elf2flt-v2021.08.orig/elf2flt.c 2023-01-29 16:47:24.791851890 +0100
  3. +++ elf2flt-v2021.08/elf2flt.c 2023-01-29 16:49:46.628476326 +0100
  4. @@ -222,7 +222,7 @@
  5. long i;
  6. printf("SYMBOL TABLE:\n");
  7. for (i=0; i<number_of_symbols; i++) {
  8. - printf(" NAME=%s VALUE=0x%"BFD_VMA_FMT"x\n",
  9. + printf(" NAME=%s VALUE=0x%x\n",
  10. symbol_table[i]->name, symbol_table[i]->value);
  11. }
  12. printf("\n");
  13. @@ -471,7 +471,7 @@
  14. if (r == NULL)
  15. continue;
  16. if (verbose)
  17. - printf(" RELOCS: %s [%p]: flags=0x%x vma=0x%"BFD_VMA_FMT"x\n",
  18. + printf(" RELOCS: %s [%p]: flags=0x%x vma=0x%x\n",
  19. r->name, r, r->flags, elf2flt_bfd_section_vma(r));
  20. if ((r->flags & SEC_RELOC) == 0)
  21. continue;
  22. @@ -966,8 +966,8 @@
  23. if (verbose)
  24. fprintf(stderr,
  25. "%s vma=0x%x, "
  26. - "value=0x%"BFD_VMA_FMT"x, "
  27. - "address=0x%"BFD_VMA_FMT"x "
  28. + "value=0x%x, "
  29. + "address=0x%x "
  30. "sym_addr=0x%x rs=0x%x, opcode=0x%x\n",
  31. "ABS32",
  32. sym_vma, (*(q->sym_ptr_ptr))->value,
  33. @@ -985,8 +985,8 @@
  34. if (verbose)
  35. fprintf(stderr,
  36. "%s vma=0x%x, "
  37. - "value=0x%"BFD_VMA_FMT"x, "
  38. - "address=0x%"BFD_VMA_FMT"x "
  39. + "value=0x%x, "
  40. + "address=0x%x "
  41. "sym_addr=0x%x rs=0x%x, opcode=0x%x\n",
  42. "PLT32",
  43. sym_vma, (*(q->sym_ptr_ptr))->value,
  44. @@ -1008,7 +1008,7 @@
  45. case R_V850_ZDA_16_16_OFFSET:
  46. case R_V850_ZDA_16_16_SPLIT_OFFSET:
  47. /* Can't support zero-relocations. */
  48. - printf ("ERROR: %s+0x%"BFD_VMA_FMT"x: zero relocations not supported\n",
  49. + printf ("ERROR: %s+0x%x: zero relocations not supported\n",
  50. sym_name, q->addend);
  51. continue;
  52. #endif /* TARGET_v850 */
  53. @@ -1208,9 +1208,9 @@
  54. temp |= (exist_val & 0x3f);
  55. *(unsigned long *)r_mem = htoniosl(temp);
  56. if (verbose)
  57. - printf("omit: offset=0x%"BFD_VMA_FMT"x symbol=%s%s "
  58. + printf("omit: offset=0x%x symbol=%s%s "
  59. "section=%s size=%d "
  60. - "fixup=0x%x (reloc=0x%"BFD_VMA_FMT"x) GPREL\n",
  61. + "fixup=0x%x (reloc=0x%x) GPREL\n",
  62. q->address, sym_name, addstr,
  63. section_name, sym_reloc_size,
  64. sym_addr, section_vma + q->address);
  65. @@ -1228,9 +1228,9 @@
  66. exist_val |= ((sym_addr & 0xFFFF) << 6);
  67. *(unsigned long *)r_mem = htoniosl(exist_val);
  68. if (verbose)
  69. - printf("omit: offset=0x%"BFD_VMA_FMT"x symbol=%s%s "
  70. + printf("omit: offset=0x%x symbol=%s%s "
  71. "section=%s size=%d "
  72. - "fixup=0x%x (reloc=0x%"BFD_VMA_FMT"x) PCREL\n",
  73. + "fixup=0x%x (reloc=0x%x) PCREL\n",
  74. q->address, sym_name, addstr,
  75. section_name, sym_reloc_size,
  76. sym_addr, section_vma + q->address);
  77. @@ -1245,7 +1245,7 @@
  78. && (p[-1]->sym_ptr_ptr == p[0]->sym_ptr_ptr)
  79. && (p[-1]->addend == p[0]->addend)) {
  80. if (verbose)
  81. - printf("omit: offset=0x%"BFD_VMA_FMT"x symbol=%s%s "
  82. + printf("omit: offset=0x%x symbol=%s%s "
  83. "section=%s size=%d LO16\n",
  84. q->address, sym_name, addstr,
  85. section_name, sym_reloc_size);
  86. @@ -1660,9 +1660,9 @@
  87. */
  88. if (relocation_needed) {
  89. if (verbose)
  90. - printf(" RELOC[%d]: offset=0x%"BFD_VMA_FMT"x symbol=%s%s "
  91. + printf(" RELOC[%d]: offset=0x%x symbol=%s%s "
  92. "section=%s size=%d "
  93. - "fixup=0x%x (reloc=0x%"BFD_VMA_FMT"x)\n",
  94. + "fixup=0x%x (reloc=0x%x)\n",
  95. flat_reloc_count,
  96. q->address, sym_name, addstr,
  97. section_name, sym_reloc_size,