mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
Embeds the address of g_crashpad_info into a .note section (which is readable by the generic code to read notes in ElfImageReader). Unfortunately because the note section is in libclient.a, it would normally be dropped at link time. To avoid that, GetCrashpadInfo() has a reference *back* to that section, which in turn forces the linker to include it, allowing the note reader to find it at runtime. Previously, it was necessary to have the embedder of "client" figure out how to cause `g_crashpad_info` to appear in the final module's dynamic symbol table. With this new approach, there's no manual configuration necessary, as it's not necessary for the symbol to be exported. This is currently only implemented in the Linux module reader (and I believe the current set of enabled tests aren't exercising it?) but it will also be done this way for the Fuchsia implementation of ModuleSnapshot. Bug: crashpad:196 Change-Id: I599db5903bc98303130d11ad850ba9ceed3b801a Reviewed-on: https://chromium-review.googlesource.com/912284 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Joshua Peraza <jperaza@chromium.org>