You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think you can go further. The comdat_sym of an associative section is meaningless. Recall that in the object file, the comdat_sym is completely implicit: it's merely the first symbol in the table that references the section. It's possible to have a section that contains no symbols, and hence has no comdat symbol. Therefore, why not parse the comdat symbol, but have it mean something else for associative sections. The comdat symbol is looked up, and its section number is emitted into the Number field.
We did some experiments with obj2yaml and the MSVC tools and this works.
I think you can go further. The comdat_sym of an associative section is
meaningless. Recall that in the object file, the comdat_sym is completely
implicit: it's merely the first symbol in the table that references the
section. It's possible to have a section that contains no symbols, and
hence has no comdat symbol. Therefore, why not parse the comdat symbol, but
have it mean something else for associative sections. The comdat symbol is
looked up, and its section number is emitted into the Number field.
We did some experiments with obj2yaml and the MSVC tools and this works.
Extended Description
When creating an associative section the syntax looks like
.section name,flags,associative assoc_name, comdat_sym
the problem is that we can have multiple sections named assoc_name.
A general but fairly disruptive change would be to have something like
%foo = .section ....
where %foo would be token that can be used to refer to the section.
A less general but simpler option would be so do the reference with
.section name,flags,associative assoc_name, assoc_comdat, comdat_sym
but given that assoc_comdat is in a section, we could also simplify this to
.section name,flags,associative assoc_comdat, comdat_sym
and in the object writer map the assoc_comdat to the assoc section number.
The text was updated successfully, but these errors were encountered: