aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index c582feb..93508e2 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -235,7 +235,13 @@ usage (FILE *stream, int status)
=gdb_index,=trace_info,=trace_abbrev,=trace_aranges,\n\
=addr,=cu_index,=links,=follow-links]\n\
Display DWARF info in the file\n\
+"));
+#ifdef ENABLE_LIBCTF
+ fprintf (stream, _("\
--ctf=SECTION Display CTF info from SECTION\n\
+"));
+#endif
+ fprintf (stream, _("\
-t, --syms Display the contents of the symbol table(s)\n\
-T, --dynamic-syms Display the contents of the dynamic symbol table\n\
-r, --reloc Display the relocation entries in the file\n\
@@ -284,9 +290,12 @@ usage (FILE *stream, int status)
--dwarf-depth=N Do not display DIEs at depth N or greater\n\
--dwarf-start=N Display DIEs starting with N, at the same depth\n\
or deeper\n\
- --dwarf-check Make additional dwarf internal consistency checks.\
- \n\
- --ctf-parent=SECTION Use SECTION as the CTF parent\n\
+ --dwarf-check Make additional dwarf internal consistency checks.\n"));
+#ifdef ENABLE_LIBCTF
+ fprintf (stream, _("\
+ --ctf-parent=SECTION Use SECTION as the CTF parent\n"));
+#endif
+ fprintf (stream, _("\
--visualize-jumps Visualize jumps by drawing ASCII art lines\n\
--visualize-jumps=color Use colors in the ASCII art\n\
--visualize-jumps=extended-color Use extended 8-bit color codes\n\
@@ -328,8 +337,10 @@ enum option_values
OPTION_NO_RECURSE_LIMIT,
OPTION_INLINES,
OPTION_SOURCE_COMMENT,
+#ifdef ENABLE_LIBCTF
OPTION_CTF,
OPTION_CTF_PARENT,
+#endif
OPTION_VISUALIZE_JUMPS
};
@@ -375,8 +386,10 @@ static struct option long_options[]=
{"special-syms", no_argument, &dump_special_syms, 1},
{"include", required_argument, NULL, 'I'},
{"dwarf", optional_argument, NULL, OPTION_DWARF},
+#ifdef ENABLE_LIBCTF
{"ctf", required_argument, NULL, OPTION_CTF},
{"ctf-parent", required_argument, NULL, OPTION_CTF_PARENT},
+#endif
{"stabs", no_argument, NULL, 'G'},
{"start-address", required_argument, NULL, OPTION_START_ADDRESS},
{"stop-address", required_argument, NULL, OPTION_STOP_ADDRESS},
@@ -4026,6 +4039,7 @@ dump_bfd_header (bfd *abfd)
}
+#ifdef ENABLE_LIBCTF
/* Formatting callback function passed to ctf_dump. Returns either the pointer
it is passed, or a pointer to newly-allocated storage, in which case
dump_ctf() will free it when it no longer needs it. */
@@ -4167,6 +4181,11 @@ dump_ctf (bfd *abfd, const char *sect_name, const char *parent_name)
free (parentdata);
free (ctfdata);
}
+#else
+static void
+dump_ctf (bfd *abfd ATTRIBUTE_UNUSED, const char *sect_name ATTRIBUTE_UNUSED,
+ const char *parent_name ATTRIBUTE_UNUSED) {}
+#endif
static void
@@ -5348,6 +5367,7 @@ main (int argc, char **argv)
case OPTION_DWARF_CHECK:
dwarf_check = TRUE;
break;
+#ifdef ENABLE_LIBCTF
case OPTION_CTF:
dump_ctf_section_info = TRUE;
dump_ctf_section_name = xstrdup (optarg);
@@ -5356,6 +5376,7 @@ main (int argc, char **argv)
case OPTION_CTF_PARENT:
dump_ctf_parent_name = xstrdup (optarg);
break;
+#endif
case 'G':
dump_stab_section_info = TRUE;
seenflag = TRUE;