From a6ea1152bc571a6622c59ad4025567361d61773d Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin (Intel)" Date: Sun, 14 Jun 2020 23:16:50 -0700 Subject: BR 3392657: dwarf: leave .debug_frame empty Until such time that we have a CFI code generator, leave .debug_frame empty. Reported-by: Philip Craig Signed-off-by: H. Peter Anvin (Intel) --- output/outelf.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'output') diff --git a/output/outelf.c b/output/outelf.c index 18b52d88..8af0f120 100644 --- a/output/outelf.c +++ b/output/outelf.c @@ -3439,9 +3439,14 @@ static void dwarf_generate(void) saa_free(plinesrel); /* build frame section */ - framelen = 4; - framebuf = pbuf = nasm_malloc(framelen); - WRITELONG(pbuf,framelen-4); /* initial length */ + if (0) { + /* This only applies if there is at least one frame defined */ + framelen = 4; + framebuf = pbuf = nasm_malloc(framelen); + WRITELONG(pbuf,framelen-4); /* initial length */ + } else { + framelen = 0; + } /* build loc section */ loclen = 16; -- cgit v1.2.1