This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizers] [MinGW] Produce undecorated symbols for /export: directives when in MinGW mode
ClosedPublic

Authored by mstorsjo on Sep 10 2018, 12:31 PM.

Details

Summary

In MinGW mode, the /export: directives in object files are interpreted differently; the symbols are not assumed to be decorated.

Since the GNU linker doesn't support the /alternatename and /include directives, there's no such distinction for them in lld. This assumes that the resulting sanitizer libraries will be linked by lld.

Diff Detail

Event Timeline

mstorsjo created this revision.Sep 10 2018, 12:31 PM
Herald added subscribers: Restricted Project, kubamracek. · View Herald TranscriptSep 10 2018, 12:31 PM

@rnk - Any input on this issue? This shows the thing that really requires lld, and which kind of is "undefined" how it should behave in a mingw configuration, since ld.bfd doesn't support it.

rnk added a comment.Sep 12 2018, 1:48 PM

I'm just waiting to hear from other sanitizer maintainers about their stance on adding the complexity of supporting mingw headers in the sanitizers.

In D51882#1232432, @rnk wrote:

I'm just waiting to hear from other sanitizer maintainers about their stance on adding the complexity of supporting mingw headers in the sanitizers.

Ok. FWIW, these patches that are left are the only one necessary (as I've seen so far; it builds fine and runs fine for some simple testcases at least), so there's not an indeterminate long tail of other tweaks needed.

So far the changes look fine to me.
Let's wait for @kcc, who hates ifdefs, to chime in.

Ping @kcc (or others)

rnk accepted this revision.Sep 25 2018, 9:06 AM

lgtm

This revision is now accepted and ready to land.Sep 25 2018, 9:06 AM
This revision was automatically updated to reflect the committed changes.