================ @@ -106,6 +126,210 @@ Error XCOFFDumper::dumpSections(ArrayRef<Shdr> Sections) { return Error::success(); } +Error XCOFFDumper::dumpFileAuxSym(XCOFFYAML::Symbol &Sym, + const XCOFFSymbolRef &SymbolEntRef) { + for (uint8_t I = 1; I <= Sym.NumberOfAuxEntries; ++I) { + uintptr_t AuxAddress = XCOFFObjectFile::getAdvancedSymbolEntryAddress( + SymbolEntRef.getEntryAddress(), I); + const XCOFFFileAuxEnt *FileAuxEntPtr = + getAuxEntPtr<XCOFFFileAuxEnt>(AuxAddress); + auto FileNameOrError = Obj.getCFileName(FileAuxEntPtr); + if (!FileNameOrError) + return FileNameOrError.takeError(); + + XCOFFYAML::FileAuxEnt FileAuxSym; + FileAuxSym.FileNameOrString = FileNameOrError.get(); + FileAuxSym.FileStringType = FileAuxEntPtr->Type; + Sym.AuxEntries.push_back( ---------------- EsmeYi wrote:
Thanks! The aux type is not in the XCOFF32 object, but it is needed in YAML to help yaml2obj create the identical object. https://github.com/llvm/llvm-project/pull/70642 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits