+static void dumpAtomLikeNM(ObjectFile::Atom* atom)
+{
+ uint32_t size = atom->getSize();
+
+ const char* visibility;
+ switch ( atom->getScope() ) {
+ case ObjectFile::Atom::scopeTranslationUnit:
+ visibility = "internal";
+ break;
+ case ObjectFile::Atom::scopeLinkageUnit:
+ visibility = "hidden ";
+ break;
+ case ObjectFile::Atom::scopeGlobal:
+ visibility = "global ";
+ break;
+ default:
+ visibility = " ";
+ break;
+ }
+
+ const char* kind;
+ switch ( atom->getDefinitionKind() ) {
+ case ObjectFile::Atom::kRegularDefinition:
+ kind = "regular ";
+ break;
+ case ObjectFile::Atom::kTentativeDefinition:
+ kind = "tentative";
+ break;
+ case ObjectFile::Atom::kWeakDefinition:
+ kind = "weak ";
+ break;
+ case ObjectFile::Atom::kAbsoluteSymbol:
+ kind = "absolute ";
+ break;
+ default:
+ kind = " ";
+ break;
+ }
+
+ printf("0x%08X %s %s %s\n", size, visibility, kind, atom->getDisplayName());
+}
+
+