Zig Version
0.10.0-dev.1487+916a65cb7
Steps to Reproduce
main.zig
const s linksection(".bar")= @import("s.zig");
comptime {
@export(entry, .{ .name = "foo", .linkage = .Strong, .section = ".bar"});
}
fn foo() callconv(.C) c_uint {
return s.bork();
}
s.zig
pub fn bork() u32 {
var p:u32 = 94;
return p;
}
zig.exe build-lib main.zig -target x86_64-windows -fno-stack-check -fPIC -fno-soname -fno-unwind-tables -dynamic -fsingle-threaded --entry foo
Expected Behavior
The s.zig import (code and data) should be placed in section .bar
Actual Behavior
Only the entrypoint 'foo' is placed in .bar.
The linksection attribute is silently ignored for the @import statement
Zig Version
0.10.0-dev.1487+916a65cb7
Steps to Reproduce
main.zig
s.zig
zig.exe build-lib main.zig -target x86_64-windows -fno-stack-check -fPIC -fno-soname -fno-unwind-tables -dynamic -fsingle-threaded --entry fooExpected Behavior
The s.zig import (code and data) should be placed in section .bar
Actual Behavior
Only the entrypoint 'foo' is placed in .bar.
The linksection attribute is silently ignored for the @import statement