@@ -401,7 +401,7 @@ Object::getInterpreter() const
401401Elf::Object::sptr Object::debugData () const {
402402 if (debugData_ == nullptr ) {
403403#ifdef WITH_LZMA
404- auto &gnu_debugdata = getSection (" .gnu_debugdata" , SHT_PROGBITS );
404+ auto &gnu_debugdata = getSection (" .gnu_debugdata" , SHT_NULL );
405405 if (gnu_debugdata) {
406406 auto reader = make_shared<const LzmaReader>(gnu_debugdata.io ());
407407 debugData_ = make_shared<Object>(context, reader, true );
@@ -493,7 +493,7 @@ const Section &
493493Object::getDebugSection (const string &name, Word type) const
494494{
495495 const auto &local = getSection (name, type);
496- if (local && local. shdr . sh_type != SHT_NOBITS )
496+ if (local)
497497 return local;
498498 const Object *debug = getDebug ();
499499 if (debug != nullptr )
@@ -610,7 +610,7 @@ Object::getDebug() const
610610 // If that doesn't work, maybe the gnu_debuglink is valid?
611611 if (!debugObject) {
612612 // if we have a debug link, use that to attempt to find the debug file.
613- const auto &hdr = getSection (" .gnu_debuglink" , SHT_PROGBITS );
613+ const auto &hdr = getSection (" .gnu_debuglink" , SHT_NULL );
614614 if (hdr) {
615615 auto link = hdr.io ()->readString (0 );
616616 auto dir = std::filesystem::path (stringify (*io)).parent_path ();
0 commit comments