This is an archive of the discontinued LLVM Phabricator instance.

[Object, MachO] Mark symbols from DATA and BSS sections as ST_Data
ClosedPublic

Authored by kubamracek on Nov 11 2015, 9:44 AM.

Details

Summary

In MachOObjectFile::getSymbolType we currently always return SymbolRef::ST_Function for symbols from any section. In order for llvm-symbolizer to correctly symbolize Mach-O globals, symbols from data and BSS sections should return SymbolRef::ST_Data.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek updated this revision to Diff 39938.Nov 11 2015, 9:44 AM
kubamracek retitled this revision from to [Object, MachO] Mark symbols from DATA and BSS sections as ST_Data.
kubamracek updated this object.
samsonov accepted this revision.Nov 11 2015, 10:10 AM
samsonov edited edge metadata.

LGTM

lib/Object/MachOObjectFile.cpp
404 ↗(On Diff #39938)

Do you actually use this variable?

This revision is now accepted and ready to land.Nov 11 2015, 10:10 AM
This revision was automatically updated to reflect the committed changes.