diff --git a/ld/testsuite/ld-ctf/data-func-conflicted-vars.d b/ld/testsuite/ld-ctf/data-func-conflicted-vars.d index 4e570c6a61a..59ab0a34108 100644 --- a/ld/testsuite/ld-ctf/data-func-conflicted-vars.d +++ b/ld/testsuite/ld-ctf/data-func-conflicted-vars.d @@ -22,6 +22,7 @@ Contents of CTF section \.ctf: String section: .* #... Data objects: + \(Section is indexed\.\) bar -> 0x[0-9a-f]*: \(kind 6\) struct var_3 \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) var_1 -> 0x[0-9a-f]*: \(kind 10\) foo_t \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .* var_666 -> 0x[0-9a-f]*: \(kind 3\) foo_t \* \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .* diff --git a/ld/testsuite/ld-ctf/data-func-conflicted.d b/ld/testsuite/ld-ctf/data-func-conflicted.d index b0db511a987..bdbcd4fc1f3 100644 --- a/ld/testsuite/ld-ctf/data-func-conflicted.d +++ b/ld/testsuite/ld-ctf/data-func-conflicted.d @@ -21,6 +21,7 @@ Contents of CTF section \.ctf: String section: .* #... Data objects: + \(Section is indexed\.\) bar -> 0x[0-9a-f]*: \(kind 6\) struct var_3 \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) var_1 -> 0x[0-9a-f]*: \(kind 10\) foo_t \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .* var_666 -> 0x[0-9a-f]*: \(kind 3\) foo_t \* \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .* diff --git a/libctf/ctf-dump.c b/libctf/ctf-dump.c index 3fd8cb87f9f..561d17ff7a2 100644 --- a/libctf/ctf-dump.c +++ b/libctf/ctf-dump.c @@ -445,11 +445,12 @@ ctf_dump_objts (ctf_dict_t *fp, ctf_dump_state_t *state, int functions) ctf_next_t *i = NULL; char *str = NULL; - if ((functions && fp->ctf_funcidx_names) - || (!functions && fp->ctf_objtidx_names)) - str = str_append (str, _("Section is indexed.\n")); + if (functions ? fp->ctf_funcidx_names : fp->ctf_objtidx_names) + str = str_append (str, _(" (Section is indexed.)\n")); else if (fp->ctf_ext_symtab.cts_data == NULL) - str = str_append (str, _("No symbol table.\n")); + str = str_append (str, _(" (No symbol table.)\n")); + if (str) + ctf_dump_append (state, str); while ((id = ctf_symbol_next (fp, &i, &name, functions)) != CTF_ERR) {