0008-remove_BFD_VMA_FMT.patch 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. diff -Nur elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12.orig/elf2flt.c elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12/elf2flt.c
  2. --- elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12.orig/elf2flt.c 2023-01-30 08:48:56.632981732 +0100
  3. +++ elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12/elf2flt.c 2023-01-30 08:53:34.510426754 +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. @@ -458,7 +458,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(abs_bfd, r));
  20. if ((r->flags & SEC_RELOC) == 0)
  21. continue;
  22. @@ -903,8 +903,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. @@ -922,8 +922,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. @@ -945,7 +945,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. @@ -1038,15 +1038,15 @@
  54. sprintf(&addstr[0], "+0x%ld", sym_addr - (*(q->sym_ptr_ptr))->value -
  55. elf2flt_bfd_section_vma(abs_bfd, sym_section));
  56. if (verbose)
  57. - printf(" RELOC[%d]: offset=0x%"BFD_VMA_FMT"x symbol=%s%s "
  58. + printf(" RELOC[%d]: offset=0x%x symbol=%s%s "
  59. "section=%s size=%d "
  60. - "fixup=0x%x (reloc=0x%"BFD_VMA_FMT"x)\n",
  61. + "fixup=0x%x (reloc=0x%x)\n",
  62. flat_reloc_count,
  63. q->address, sym_name, addstr,
  64. section_name, sym_reloc_size,
  65. sym_addr, section_vma + q->address);
  66. if (verbose)
  67. - printf("reloc[%d] = 0x%"BFD_VMA_FMT"x\n",
  68. + printf("reloc[%d] = 0x%x\n",
  69. flat_reloc_count, section_vma + q->address);
  70. continue;
  71. @@ -1163,9 +1163,9 @@
  72. temp |= (exist_val & 0x3f);
  73. *(unsigned long *)r_mem = htoniosl(temp);
  74. if (verbose)
  75. - printf("omit: offset=0x%"BFD_VMA_FMT"x symbol=%s%s "
  76. + printf("omit: offset=0x%x symbol=%s%s "
  77. "section=%s size=%d "
  78. - "fixup=0x%x (reloc=0x%"BFD_VMA_FMT"x) GPREL\n",
  79. + "fixup=0x%x (reloc=0x%x) GPREL\n",
  80. q->address, sym_name, addstr,
  81. section_name, sym_reloc_size,
  82. sym_addr, section_vma + q->address);
  83. @@ -1183,9 +1183,9 @@
  84. exist_val |= ((sym_addr & 0xFFFF) << 6);
  85. *(unsigned long *)r_mem = htoniosl(exist_val);
  86. if (verbose)
  87. - printf("omit: offset=0x%"BFD_VMA_FMT"x symbol=%s%s "
  88. + printf("omit: offset=0x%x symbol=%s%s "
  89. "section=%s size=%d "
  90. - "fixup=0x%x (reloc=0x%"BFD_VMA_FMT"x) PCREL\n",
  91. + "fixup=0x%x (reloc=0x%x) PCREL\n",
  92. q->address, sym_name, addstr,
  93. section_name, sym_reloc_size,
  94. sym_addr, section_vma + q->address);
  95. @@ -1200,7 +1200,7 @@
  96. && (p[-1]->sym_ptr_ptr == p[0]->sym_ptr_ptr)
  97. && (p[-1]->addend == p[0]->addend)) {
  98. if (verbose)
  99. - printf("omit: offset=0x%"BFD_VMA_FMT"x symbol=%s%s "
  100. + printf("omit: offset=0x%x symbol=%s%s "
  101. "section=%s size=%d LO16\n",
  102. q->address, sym_name, addstr,
  103. section_name, sym_reloc_size);
  104. @@ -1610,9 +1610,9 @@
  105. }
  106. if (verbose)
  107. - printf(" RELOC[%d]: offset=0x%"BFD_VMA_FMT"x symbol=%s%s "
  108. + printf(" RELOC[%d]: offset=0x%x symbol=%s%s "
  109. "section=%s size=%d "
  110. - "fixup=0x%x (reloc=0x%"BFD_VMA_FMT"x)\n",
  111. + "fixup=0x%x (reloc=0x%x)\n",
  112. flat_reloc_count,
  113. q->address, sym_name, addstr,
  114. section_name, sym_reloc_size,
  115. @@ -1630,7 +1630,7 @@
  116. (section_vma + q->address);
  117. if (verbose)
  118. - printf("reloc[%d] = 0x%"BFD_VMA_FMT"x\n",
  119. + printf("reloc[%d] = 0x%x\n",
  120. flat_reloc_count, section_vma + q->address);
  121. #else
  122. switch ((*p)->howto->type) {