diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-10-10 00:41:58 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-10-10 14:21:52 -0700 |
| commit | 14c8e270bb47c4e10ee3392661d4c62ab5c2f89d (patch) | |
| tree | c74fe79e74d3fc6bff7dd61f372153906e29e040 /src/link/StringTable.zig | |
| parent | 58349b2c8ebc57718bbfbf939c30b586d5c85466 (diff) | |
| download | zig-14c8e270bb47c4e10ee3392661d4c62ab5c2f89d.tar.gz zig-14c8e270bb47c4e10ee3392661d4c62ab5c2f89d.zip | |
link: fix false positive crtbegin/crtend detection
Embrace the Path abstraction, doing more operations based on directory
handles rather than absolute file paths. Most of the diff noise here
comes from this one.
Fix sorting of crtbegin/crtend atoms. Previously it would look at all
path components for those strings.
Make the C runtime path detection partially a pure function, and move
some logic to glibc.zig where it belongs.
Diffstat (limited to 'src/link/StringTable.zig')
| -rw-r--r-- | src/link/StringTable.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/link/StringTable.zig b/src/link/StringTable.zig index b03e025ff0..f8a917b249 100644 --- a/src/link/StringTable.zig +++ b/src/link/StringTable.zig @@ -15,7 +15,7 @@ pub fn insert(self: *Self, gpa: Allocator, string: []const u8) !u32 { if (gop.found_existing) return gop.key_ptr.*; try self.buffer.ensureUnusedCapacity(gpa, string.len + 1); - const new_off = @as(u32, @intCast(self.buffer.items.len)); + const new_off: u32 = @intCast(self.buffer.items.len); self.buffer.appendSliceAssumeCapacity(string); self.buffer.appendAssumeCapacity(0); |
