@@ -11592,8 +11592,7 @@ output_file_names (void)
#else
dw2_asm_output_data (1, 2, "File name entry format count");
#endif
- dw2_asm_output_data_uleb128 (DW_LNCT_path, "DW_LNCT_path");
- dw2_asm_output_data_uleb128 (str_form, get_DW_FORM_name (str_form));
+ /* Keep DW_LNCT_path last for better binutils readelf readability. */
dw2_asm_output_data_uleb128 (DW_LNCT_directory_index,
"DW_LNCT_directory_index");
dw2_asm_output_data_uleb128 (idx_form, get_DW_FORM_name (idx_form));
@@ -11603,9 +11602,10 @@ output_file_names (void)
dw2_asm_output_data_uleb128 (DW_LNCT_size, "DW_LNCT_size");
dw2_asm_output_data_uleb128 (DW_FORM_udata, "DW_FORM_udata");
#endif
- dw2_asm_output_data_uleb128 (numfiles + 1, "File names count");
+ dw2_asm_output_data_uleb128 (DW_LNCT_path, "DW_LNCT_path");
+ dw2_asm_output_data_uleb128 (str_form, get_DW_FORM_name (str_form));
- output_line_string (str_form, filename0, "File Entry", 0);
+ dw2_asm_output_data_uleb128 (numfiles + 1, "File names count");
/* Include directory index. */
if (dwarf_version >= 5 && idx_form != DW_FORM_udata)
@@ -11618,6 +11618,8 @@ output_file_names (void)
dw2_asm_output_data_uleb128 (0, NULL);
dw2_asm_output_data_uleb128 (0, NULL);
#endif
+
+ output_line_string (str_form, filename0, "File Entry", 0);
}
/* Now write all the file names. */
@@ -11644,7 +11646,8 @@ output_file_names (void)
snprintf (filebuf, maxfilelen, "%s;%d",
files[file_idx].path + dirs[dir_idx].length, ver);
- output_line_string (str_form, filebuf, "File Entry", (unsigned) i + 1);
+ if (dwarf_version < 5)
+ output_line_string (str_form, filebuf, "File Entry", (unsigned) i + 1);
/* Include directory index. */
if (dwarf_version >= 5 && idx_form != DW_FORM_udata)
@@ -11662,10 +11665,14 @@ output_file_names (void)
dw2_asm_output_data_uleb128 ((vms_file_stats_name (files[file_idx].path,
0, &siz, 0, 0) == 0)
? siz : 0, NULL);
+
+ if (dwarf_version >= 5)
+ output_line_string (str_form, filebuf, "File Entry", (unsigned) i + 1);
#else
- output_line_string (str_form,
- files[file_idx].path + dirs[dir_idx].length,
- "File Entry", (unsigned) i + 1);
+ if (dwarf_version < 5)
+ output_line_string (str_form,
+ files[file_idx].path + dirs[dir_idx].length,
+ "File Entry", (unsigned) i + 1);
/* Include directory index. */
if (dwarf_version >= 5 && idx_form != DW_FORM_udata)
@@ -11675,13 +11682,17 @@ output_file_names (void)
dw2_asm_output_data_uleb128 (dir_idx + idx_offset, NULL);
if (dwarf_version >= 5)
- continue;
-
- /* Modification time. */
- dw2_asm_output_data_uleb128 (0, NULL);
+ output_line_string (str_form,
+ files[file_idx].path + dirs[dir_idx].length,
+ "File Entry", (unsigned) i + 1);
+ else
+ {
+ /* Modification time. */
+ dw2_asm_output_data_uleb128 (0, NULL);
- /* File length in bytes. */
- dw2_asm_output_data_uleb128 (0, NULL);
+ /* File length in bytes. */
+ dw2_asm_output_data_uleb128 (0, NULL);
+ }
#endif /* VMS_DEBUGGING_INFO */
}