summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2020-06-14 23:16:50 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2020-06-14 23:16:50 -0700
commita6ea1152bc571a6622c59ad4025567361d61773d (patch)
tree7e90c43a0bd9affd33ede7aa94c71ffb989723fe /output
parent7acbaf523c1f78ec96c8805ffb92052b3b2b040f (diff)
downloadnasm-a6ea1152bc571a6622c59ad4025567361d61773d.tar.gz
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 <philipjcraig@gmail.com> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'output')
-rw-r--r--output/outelf.c11
1 files changed, 8 insertions, 3 deletions
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;