aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-10-23 10:36:36 +0200
committerJan Beulich <jbeulich@suse.com>2023-10-23 10:36:36 +0200
commita0094f1a70e1d5a7a8124e7c988fc1ddd1886f19 (patch)
treed6e8add33de5a9eeed47a75f544e4f196dcdb3d2 /gas/write.c
parentc69011e9533ec2b26b4983badcffdab807a2d754 (diff)
downloadgdb-a0094f1a70e1d5a7a8124e7c988fc1ddd1886f19.zip
gdb-a0094f1a70e1d5a7a8124e7c988fc1ddd1886f19.tar.gz
gdb-a0094f1a70e1d5a7a8124e7c988fc1ddd1886f19.tar.bz2
gas: make .nops output visible in listing
Due to using a different frag type (in turn due to storing data differently), making the resulting code appear in listings requires special handling.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gas/write.c b/gas/write.c
index 573a667..20ba3f8 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -1682,7 +1682,12 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
bfd_get_filename (stdoutput),
bfd_errmsg (bfd_get_error ()));
offset += count;
- free (buf);
+#ifndef NO_LISTING
+ if (listing & LISTING_LISTING)
+ f->fr_opcode = buf;
+ else
+#endif
+ free (buf);
}
continue;
}