link/elf: actually emit DYN when targetting haiku

This commit is contained in:
Jakub Konka 2024-04-08 20:54:54 +02:00
parent b66fd87a4c
commit 9875ab4ee8

View File

@ -2928,7 +2928,7 @@ pub fn writeElfHeader(self: *Elf) !void {
const output_mode = comp.config.output_mode;
const link_mode = comp.config.link_mode;
const elf_type: elf.ET = switch (output_mode) {
.Exe => if (comp.config.pie) .DYN else .EXEC,
.Exe => if (comp.config.pie or target.os.tag == .haiku) .DYN else .EXEC,
.Obj => .REL,
.Lib => switch (link_mode) {
.static => @as(elf.ET, .REL),