GAS: Do not create an entry for the default directory if the directory table is empty...
[deliverable/binutils-gdb.git] / gas / dwarf2dbg.c
index 213f382887714c573af157481f33f57438dffae9..071450e19a182d69fdf8b8f5434b6df8ce976b3d 100644 (file)
@@ -1981,7 +1981,6 @@ out_dir_and_file_list (void)
   bfd_boolean emit_filesize = TRUE;
 
   /* Output the Directory Table.  */
-
   if (DWARF2_LINE_VERSION >= 5)
     {
       out_byte (1);
@@ -1993,7 +1992,7 @@ out_dir_and_file_list (void)
     }
       
   /* Emit directory list.  */
-  if (DWARF2_LINE_VERSION >= 5)
+  if (DWARF2_LINE_VERSION >= 5 && dirs_in_use > 0)
     {
       if (dirs == NULL || dirs[0] == NULL)
        dir = remap_debug_filename (".");
@@ -2017,7 +2016,6 @@ out_dir_and_file_list (void)
     out_byte ('\0');
 
   /* Output the File Name Table.  */
-
   if (DWARF2_LINE_VERSION >= 5)
     {
       unsigned int columns = 4;
@@ -2045,7 +2043,6 @@ out_dir_and_file_list (void)
       
       /* The number of format entries to follow.  */
       out_byte (columns);
-
       /* The format of the file name.  */
       out_uleb128 (DW_LNCT_path);
       /* FIXME: it would be better to store these strings in
This page took 0.024172 seconds and 4 git commands to generate.