[10/59] libctf, create: empty dicts are dirty to start with

Message ID 20200630233146.338613-11-nick.alcock@oracle.com
State New
Headers show
Series
  • Deduplicating CTF linker
Related show

Commit Message

H.J. Lu via Binutils June 30, 2020, 11:30 p.m.
Without this, an empty dict that is written out immediately never gets
any content at all: even the header is left empty.

libctf/
	* ctf-create.c (ctf_create): Mark dirty.
---
 libctf/ctf-create.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.27.0.247.g3dff7de930

Patch

diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c
index 5cbcfe0a702..1416d187fd9 100644
--- a/libctf/ctf-create.c
+++ b/libctf/ctf-create.c
@@ -126,6 +126,7 @@  ctf_create (int *errp)
   fp->ctf_dtoldid = 0;
   fp->ctf_snapshots = 1;
   fp->ctf_snapshot_lu = 0;
+  fp->ctf_flags |= LCTF_DIRTY;
 
   ctf_set_ctl_hashes (fp);
   ctf_setmodel (fp, CTF_MODEL_NATIVE);