add --eh-frame-hdr conditionally

This commit is contained in:
David Cao
2020-01-03 21:28:58 -08:00
committed by Andrew Kelley
parent 599213463d
commit 8e57dd57ca
8 changed files with 32 additions and 2 deletions

View File

@@ -1647,7 +1647,9 @@ static void construct_linker_job_elf(LinkJob *lj) {
lj->args.append("--gc-sections");
}
lj->args.append("--eh-frame-hdr");
if (g->link_eh_frame_hdr) {
lj->args.append("--eh-frame-hdr");
}
lj->args.append("-m");
lj->args.append(getLDMOption(g->zig_target));