[PATCH] D19376: [MC] Create unique .pdata sections for every .text section
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 30 11:49:40 PDT 2016
rafael added inline comments.
================
Comment at: include/llvm/MC/MCSectionCOFF.h:36
@@ +35,3 @@
+ /// The unique IDs used with the .pdata and .xdata sections created internally
+ /// by the assembler. This ID is used to ensure that there is a one-to-one
+ /// mapping from .text section to .pdata and .xdata sections. This data is
----------------
one-to-many, no?
================
Comment at: include/llvm/MC/MCSectionCOFF.h:39
@@ +38,3 @@
+ /// mutable because this ID is not notionally part of the section.
+ mutable unsigned WinCFISectionID = ~0U;
+
----------------
So, this is not the unique id of this section, it is the id of the related .xdata and .pdata, correct?
Why do you have to implement it like that? For ELF we store the unique id of the section itself. Then when you want to construct a .xdata or .pdata for this .text you can just use the existing unique id, no? So for example, you would end up with 3 section, .text, .xdata and .pdata all of which have an unique id of 42.
Maybe the name unique id is confusing. It is not really unique, it is really just an disambiguator when the rest (name, flags) are the same.
http://reviews.llvm.org/D19376
More information about the llvm-commits
mailing list