Added size check to elf test
| Author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-09-19 15:00:23 +0200 |
| Committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-09-19 15:00:23 +0200 |
| Commit | 4e7168819f1a70d8b3e137ae20f36e6fc50f5286 (patch) |
|
-rw-r--r-- |
zig-elf/main.zig | 3 |
1 files changed, 3 insertions, 0 deletions
| diff --git a/zig-elf/main.zig b/zig-elf/main.zig | |||
| ... | |||
| 35 | 35 | ||
| 36 | const header: *Elf64ExecutionHeader = @ptrCast(@alignCast(&buffer)); |
36 | const header: *Elf64ExecutionHeader = @ptrCast(@alignCast(&buffer)); |
| 37 | 37 | ||
| 38 | std.debug.print("sizeOf(Elf64ExecutionHeader) = {}\n", .{@sizeOf(Elf64ExecutionHeader)}); |
||
| 39 | std.debug.print("bitSizeOf(Elf64ExecutionHeader) = {}\n", .{@bitSizeOf(Elf64ExecutionHeader)}); |
||
| 40 | |||
| 38 | std.debug.print("Object file type: {}\n", .{header.type}); |
41 | std.debug.print("Object file type: {}\n", .{header.type}); |
| 39 | std.debug.print("Architecture: {}\n", .{header.machine}); |
42 | std.debug.print("Architecture: {}\n", .{header.machine}); |
| 40 | std.debug.print("Object file version: 0x{X:0>2}\n", .{header.version}); |
43 | std.debug.print("Object file version: 0x{X:0>2}\n", .{header.version}); |
| ... | |||