mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
std.macho: remove alignment from LoadCommandIterator
This commit is contained in:
parent
d8540dd708
commit
8ebebbd134
2 changed files with 3 additions and 3 deletions
|
|
@ -539,7 +539,7 @@ const MachODumper = struct {
|
|||
strings: []const u8,
|
||||
};
|
||||
|
||||
fn parseAndDump(step: *Step, bytes: []align(@alignOf(u64)) const u8) ![]const u8 {
|
||||
fn parseAndDump(step: *Step, bytes: []const u8) ![]const u8 {
|
||||
const gpa = step.owner.allocator;
|
||||
var stream = std.io.fixedBufferStream(bytes);
|
||||
const reader = stream.reader();
|
||||
|
|
@ -556,7 +556,7 @@ const MachODumper = struct {
|
|||
var sections = std.ArrayList(macho.section_64).init(gpa);
|
||||
var imports = std.ArrayList([]const u8).init(gpa);
|
||||
|
||||
var it = LoadCommandIterator{
|
||||
var it: LoadCommandIterator = .{
|
||||
.ncmds = hdr.ncmds,
|
||||
.buffer = bytes[@sizeOf(macho.mach_header_64)..][0..hdr.sizeofcmds],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1853,7 +1853,7 @@ pub const data_in_code_entry = extern struct {
|
|||
|
||||
pub const LoadCommandIterator = struct {
|
||||
ncmds: usize,
|
||||
buffer: []align(@alignOf(u64)) const u8,
|
||||
buffer: []const u8,
|
||||
index: usize = 0,
|
||||
|
||||
pub const LoadCommand = struct {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue