mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 04:24:33 +01:00
link/MachO: Add correct section flags (S_COALESCED, S_ATTR_NO_TOC,
S_ATTR_STRIP_STATIC_SYMS, S_ATTR_LIVE_SUPPORT) to __eh_frame section to match platform conventions
This commit is contained in:
parent
fc517bd01c
commit
05b15e8bdb
2 changed files with 6 additions and 2 deletions
|
|
@ -1707,7 +1707,9 @@ fn initSyntheticSections(self: *MachO) !void {
|
|||
} else false;
|
||||
if (needs_eh_frame) {
|
||||
assert(needs_unwind_info);
|
||||
self.eh_frame_sect_index = try self.addSection("__TEXT", "__eh_frame", .{});
|
||||
self.eh_frame_sect_index = try self.addSection("__TEXT", "__eh_frame", .{
|
||||
.flags = macho.S_COALESCED | macho.S_ATTR_NO_TOC | macho.S_ATTR_STRIP_STATIC_SYMS | macho.S_ATTR_LIVE_SUPPORT,
|
||||
});
|
||||
}
|
||||
|
||||
if (self.getInternalObject()) |obj| {
|
||||
|
|
|
|||
|
|
@ -289,7 +289,9 @@ fn initOutputSections(macho_file: *MachO) !void {
|
|||
} else false;
|
||||
if (needs_eh_frame) {
|
||||
assert(needs_unwind_info);
|
||||
macho_file.eh_frame_sect_index = try macho_file.addSection("__TEXT", "__eh_frame", .{});
|
||||
macho_file.eh_frame_sect_index = try macho_file.addSection("__TEXT", "__eh_frame", .{
|
||||
.flags = std.macho.S_COALESCED | std.macho.S_ATTR_NO_TOC | std.macho.S_ATTR_STRIP_STATIC_SYMS | std.macho.S_ATTR_LIVE_SUPPORT,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue