mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
glibc: Emit _IO_stdin_used reference in .rodata.
This fixes an X86_64_32 relocation linker error when targeting gnux32.
This commit is contained in:
parent
50cae505f7
commit
43878f51d9
@ -1015,7 +1015,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi
|
||||
}
|
||||
}
|
||||
|
||||
try stubs_asm.appendSlice(".data\n");
|
||||
try stubs_asm.appendSlice(".rodata\n");
|
||||
|
||||
// For some targets, the real `libc.so.6` will contain a weak reference to `_IO_stdin_used`,
|
||||
// making the linker put the symbol in the dynamic symbol table. We likewise need to emit a
|
||||
@ -1046,6 +1046,8 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) !voi
|
||||
});
|
||||
}
|
||||
|
||||
try stubs_asm.appendSlice(".data\n");
|
||||
|
||||
const obj_inclusions_len = try inc_reader.readInt(u16, .little);
|
||||
|
||||
sym_i = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user