HomePhabricator

hwasan: Move .note.hwasan.globals note to hwasan.module_ctor comdat.

Authored by pcc on Jan 17 2020, 9:49 AM.

Description

hwasan: Move .note.hwasan.globals note to hwasan.module_ctor comdat.

As of D70146 lld GCs comdats as a group and no longer considers notes in
comdats to be GC roots, so we need to move the note to a comdat with a GC root
section (.init_array) in order to prevent lld from discarding the note.

Differential Revision: https://reviews.llvm.org/D72936