From 599213463d51bf3946df53e04091f6cda3d8ee0e Mon Sep 17 00:00:00 2001 From: David Cao Date: Tue, 24 Dec 2019 14:26:09 -0800 Subject: [PATCH] add --eh-frame-hdr arg for linking --- src-self-hosted/link.zig | 1 + src/link.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src-self-hosted/link.zig b/src-self-hosted/link.zig index afe4d10c65..997fbd6818 100644 --- a/src-self-hosted/link.zig +++ b/src-self-hosted/link.zig @@ -144,6 +144,7 @@ fn constructLinkerArgsElf(ctx: *Context) !void { // lj->args.append(g->linker_script); //} try ctx.args.append("--gc-sections"); + try ctx.args.append("--eh-frame-hdr"); //lj->args.append("-m"); //lj->args.append(getLDMOption(&g->zig_target)); diff --git a/src/link.cpp b/src/link.cpp index 530a0c27c4..54a8b208fd 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -1647,6 +1647,8 @@ static void construct_linker_job_elf(LinkJob *lj) { lj->args.append("--gc-sections"); } + lj->args.append("--eh-frame-hdr"); + lj->args.append("-m"); lj->args.append(getLDMOption(g->zig_target));