This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [COFF] Omit automatically imported symbols from the symbol table
ClosedPublic

Authored by mstorsjo on Aug 4 2019, 12:55 PM.

Details

Summary

For these symbols, they actually point to the symbol's IAT entry instead, which obviously is different from the symbol itself (which is imported from a different module and doesn't exist in this one).

Omitting this symbol helps gdb inspect automatically imported symbols, see https://sourceware.org/bugzilla/show_bug.cgi?id=24574 for discussion on the matter.

Surprisingly, those extra symbols don't seem to be an issue for gdb when the sources have been built with clang, only with gcc. The actual logic in gdb that this depends on still is unknown, but omitting these symbols from the symbol table is the right thing to do in any case.

While this isn't a normal bugfix, it fixes one issue reported to me by a user, and the fix is very straightforward, so maybe it still could qualify for the release branch @hans?

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Aug 4 2019, 12:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2019, 12:55 PM
ruiu accepted this revision.Aug 4 2019, 5:36 PM

LGTM

This revision is now accepted and ready to land.Aug 4 2019, 5:36 PM
hans added a comment.Aug 5 2019, 1:15 AM

While this isn't a normal bugfix, it fixes one issue reported to me by a user, and the fix is very straightforward, so maybe it still could qualify for the release branch @hans?

Yes, I'm okay with merging once it's been in trunk a little while.

This revision was automatically updated to reflect the committed changes.
hans added a comment.Aug 6 2019, 12:47 AM

While this isn't a normal bugfix, it fixes one issue reported to me by a user, and the fix is very straightforward, so maybe it still could qualify for the release branch @hans?

Yes, I'm okay with merging once it's been in trunk a little while.

Merged in r367986.