From 9517ab36e19e9b4566425005433d20f21d01cd72 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" Date: Wed, 24 Apr 2024 15:21:51 +0200 Subject: cmELF: correct error message from GetDynamicSectionString Fixes: #25929 --- Source/cmELF.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index d9a4408..a71e5f1 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -621,7 +621,19 @@ cmELF::StringEntry const* cmELFInternalImpl::GetDynamicSectionString( // Make sure the whole value was read. if (!(*this->Stream)) { - this->SetErrorMessage("Dynamic section specifies unreadable RPATH."); + if (tag == cmELF::TagRPath) { + this->SetErrorMessage( + "Dynamic section specifies unreadable DT_RPATH"); + } else if (tag == cmELF::TagRunPath) { + this->SetErrorMessage( + "Dynamic section specifies unreadable DT_RUNPATH"); + } else if (tag == cmELF::TagMipsRldMapRel) { + this->SetErrorMessage( + "Dynamic section specifies unreadable DT_MIPS_RLD_MAP_REL"); + } else { + this->SetErrorMessage("Dynamic section specifies unreadable value" + " for unexpected attribute"); + } se.Value = ""; return nullptr; } -- cgit v0.12