Issue 181026.2: Replace DW_FORM_strp_sup with strp_sup4 and strp_sup8

Author: Paul Robinson
Champion: Paul Robinson
Date submitted: 2018-10-26
Date revised:
Date closed: 2021-11-01
Type: Enhancement
Status: Withdrawn
DWARF Version: 6

Section Many, pg Many


DW_FORM_strp_sup represents an offset within the supplementary file. However, being a reference, the size of strp_sup depends on the DWARF-32/64 format of the section from which the reference is made, and it should instead accommodate the format of the section to which the reference is made. This is the same argument for why we have DW_FORM_ref_sup[4,8] instead of simply DW_FORM_ref_sup.

While compiling the set of specification changes for this issue, I discovered a related error: A sentence in section 7.5.5 (describing the 'string' class) describing what DW_FORM_strp_sup means within a supplementary object file, when section 7.3.6 says this form is not used in those files. The proposal below removes the sentence from section 7.5.5, assuming that the description in section 7.3.6 is correct.

Proposed specification changes:

Section Standard Content Descriptions, p.158

In item 1 DW_LNCT_path, first paragraph, replace the sentence:

If the form code is DW_FORM_line_strp, DW_FORM_strp, or DW_FORM_strp_sup, then the string is included in the .debug_line_str, .debug_str or supplementary string section, respectively, and its offset occurs immediately in the containing directories or file_names field.

With this:

If the form code is DW_FORM_line_strp or DW_FORM_strp, then the string is included in the .debug_line_str or .debug_str section, respectively; if the form code is DW_FORM_strp_sup4 or DW_FORM_strp_sup8, then the string is included in the supplementary string section; and in all these cases, the offset of the string within its section occurs immediately in the containing directoriesorfile_names` field.

Section 6.3.1 Macro Information Header, p.167

In the list of allowed forms, on line 10, replace "DW_FORM_strp_sup" with "DW_FORM_strp_sup4, DW_FORM_strp_sup8".

Section 7.3.6 DWARF Supplementary Object Files, p.195

On line 22, replace "DW_FORM_strp_sup" with "DW_FORM_strp_sup4 or DW_FORM_strp_sup8".

On line 25, replace "DW_FORM_strp_sup" with "DW_FORM_strp_sup4 or DW_FORM_strp_sup8".

After the paragraph ending on line 27, add a non-normative paragraph:

Forms for both 4- and 8-byte references are provided so that references may use the appropriate offset size for the content of the supplementary object file, which might not use the same 32-bit or 64-bit DWARF format as a referencing object file.

Section 7.4 32-Bit and 64-Bit DWARF Formats, p.197

In the table for item 3, remove the entry for DW_FORM_strp_sup.

Section 7.5.5 Classes and Forms, p.218

In the bullet item for class string, second sub-bullet (lines 20-30):

Section 7.5.6, Form Encodings, Table 7.6

Remove (or mark as obsolete) the entry for DW_FORM_strp_sup (0x1d). Add entries for DW_FORM_strp_sup4 and DW_FORM_strp_sup8, both class string.

2021-10-04: Updated.
2021-11-01: Withdrawn; see Issue 211101.1