From a0094f1a70e1d5a7a8124e7c988fc1ddd1886f19 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 23 Oct 2023 10:36:36 +0200 Subject: 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. --- gas/write.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gas/write.c') 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; } -- cgit v1.1