Issue 181003.1: Forbid DW_OP_call_ref/DW_FORM_ref_addr in a .dwo section

Author: Paul T Robinson
Champion: Jeremy Morse
Date submitted: 2018-10-03
Date revised: 2022-07-29
Date closed: 2022-08-08
Type: Error
Status: Accepted
DWARF Version: 6
Section 7.3.2.2, pg 189

Background
==========

DW_OP_call_ref (and DW_FORM_ref_addr) require relocations, and
so should be forbidden in a .dwo section, as a .dwo cannot have
relocations.

To discourage producers from generating .dwo sections that could
potentially make use of such references, make an assumption (that
.dwo files only contain a single compilation unit) into an explicit
limitation.

To avoid invasive changes to the text, I suggest we should only
add qualifiers to the paragraphs about split-DWARF, rather than to
the definitions of DW_OP_call_ref and DW_FORM_ref_addr.

Changes
=======

Section 7.3.2.2 p189 line 6
---------------------------

[current]
Split DWARF object files do not get linked with any other files, therefore
references between sections must not make use of normal object file relocation
information. As a result, symbolic references within or between sections are not
possible.

[replace]
"symbolic references within or between sections are not possible."
[with]
"symbolic references such as DW_FORM_ref_addr and DW_OP_call_ref
within or between sections are not possible. Split DWARF object files
should contain at most one compilation unit."

Figure B.2 note "(fo)" p280 line 6
----------------------------------

Delete: this whole note. DW_OP_call_ref will not be permitted in
.debug_info.dwo, and this item does not appear in figure B.2 anyway.

--
2022-07-29:  Updated.
2022-08-08:  Accepted.