[PATCH] [PECOFF] Support a new type of weak symbol.

Shankar Kalpathi Easwaran shankarke at gmail.com
Thu Mar 6 16:40:14 PST 2014

  This is what I snipped from the COFF manual


  5.5.6. COMDAT Sections (Object Only)
  The Selection field of the Section Definition auxiliary format is applicable if the section is
  a COMDAT section: a section that can be defined by more than one object file. (The flag
  IMAGE_SCN_LNK_COMDAT is set in the Section Flags field of the section header.)
  The Selection field determines the way that the linker resolves the multiple definitions of
  COMDAT sections.
  The first symbol having the section value of the COMDAT section must be the section
  symbol. This symbol has the name of the section, Value field equal to 0, the section
  number of the COMDAT section in question, Type field equal to
  one auxiliary record. The second symbol is called “the COMDAT symbol” and is used by
  the linker in conjunction with the Selection field.


  It looks like you need to deal with the COMDAT symbol with a typeGroupComdat, i.e in the test case _foo needs to be handled as the symbol that represents the group.


More information about the llvm-commits mailing list