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