Commit 67afb7f
committed
scripts/sorttable: Add helper functions for Elf_Shdr
In order to remove the double #include of sorttable.h for 64 and 32 bit
to create duplicate functions, add helper functions for Elf_Shdr. This
will create a function pointer for each helper that will get assigned to
the appropriate function to handle either the 64bit or 32bit version.
This also moves the _r()/r() wrappers for the Elf_Shdr references that
handle endian and size differences between the different architectures,
into the helper function and out of the open code which is more error
prone.
Cc: bpf <bpf@vger.kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Cc: Zheng Yejian <zhengyejian1@huawei.com>
Cc: Martin Kelly <martin.kelly@crowdstrike.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/20250105162345.940924221@goodmis.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>1 parent 1dfb59a commit 67afb7f
2 files changed
Lines changed: 85 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
113 | 155 | | |
114 | 156 | | |
115 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
| |||
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
50 | 64 | | |
51 | 65 | | |
52 | 66 | | |
| |||
62 | 76 | | |
63 | 77 | | |
64 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
65 | 86 | | |
66 | 87 | | |
67 | 88 | | |
| |||
177 | 198 | | |
178 | 199 | | |
179 | 200 | | |
180 | | - | |
181 | | - | |
| 201 | + | |
| 202 | + | |
182 | 203 | | |
183 | 204 | | |
184 | 205 | | |
| |||
267 | 288 | | |
268 | 289 | | |
269 | 290 | | |
270 | | - | |
| 291 | + | |
271 | 292 | | |
272 | | - | |
| 293 | + | |
273 | 294 | | |
274 | 295 | | |
275 | 296 | | |
276 | | - | |
| 297 | + | |
277 | 298 | | |
278 | 299 | | |
279 | 300 | | |
280 | 301 | | |
281 | | - | |
| 302 | + | |
282 | 303 | | |
283 | 304 | | |
284 | 305 | | |
285 | 306 | | |
286 | 307 | | |
287 | 308 | | |
288 | 309 | | |
289 | | - | |
| 310 | + | |
290 | 311 | | |
291 | | - | |
| 312 | + | |
292 | 313 | | |
293 | 314 | | |
294 | 315 | | |
| |||
304 | 325 | | |
305 | 326 | | |
306 | 327 | | |
307 | | - | |
| 328 | + | |
308 | 329 | | |
309 | | - | |
| 330 | + | |
310 | 331 | | |
311 | 332 | | |
312 | | - | |
| 333 | + | |
313 | 334 | | |
314 | | - | |
| 335 | + | |
315 | 336 | | |
316 | 337 | | |
317 | 338 | | |
| |||
374 | 395 | | |
375 | 396 | | |
376 | 397 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
381 | 401 | | |
382 | 402 | | |
383 | | - | |
| 403 | + | |
384 | 404 | | |
385 | | - | |
| 405 | + | |
386 | 406 | | |
387 | 407 | | |
388 | 408 | | |
389 | 409 | | |
390 | 410 | | |
391 | | - | |
392 | | - | |
393 | | - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
394 | 414 | | |
395 | 415 | | |
396 | 416 | | |
| |||
415 | 435 | | |
416 | 436 | | |
417 | 437 | | |
418 | | - | |
| 438 | + | |
419 | 439 | | |
420 | | - | |
| 440 | + | |
421 | 441 | | |
422 | 442 | | |
423 | 443 | | |
| |||
0 commit comments