summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--output/outelf32.c2
-rw-r--r--output/outelf64.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/output/outelf32.c b/output/outelf32.c
index 491b9ae4..63762b19 100644
--- a/output/outelf32.c
+++ b/output/outelf32.c
@@ -1185,7 +1185,7 @@ static void elf_write(void)
/* for dwarf debugging information, create the ten dwarf sections */
/* this function call creates the dwarf sections in memory */
- dwarf32_generate();
+ if (dwarf_fsect) dwarf32_generate();
p += strlen(p) + 1;
elf_section_header(p - shstrtab, SHT_PROGBITS, 0, arangesbuf, false,
diff --git a/output/outelf64.c b/output/outelf64.c
index e7abba6d..3811a03f 100644
--- a/output/outelf64.c
+++ b/output/outelf64.c
@@ -1216,7 +1216,7 @@ static void elf_write(void)
/* for dwarf debugging information, create the ten dwarf sections */
/* this function call creates the dwarf sections in memory */
- dwarf64_generate();
+ if (dwarf_fsect) dwarf64_generate();
p += strlen(p) + 1;
elf_section_header(p - shstrtab, SHT_PROGBITS, 0, arangesbuf, false,