summaryrefslogtreecommitdiffstats
path: root/Source/cmELF.cxx
diff options
context:
space:
mode:
authorJoachim Wuttke (h) <j.wuttke@fz-juelich.de>2024-04-24 13:21:51 (GMT)
committerBrad King <brad.king@kitware.com>2024-04-25 14:30:08 (GMT)
commit9517ab36e19e9b4566425005433d20f21d01cd72 (patch)
treef4b9b9ae9c1ab79e9d4291a92c24e8f327433df2 /Source/cmELF.cxx
parent30fd6df0b175c697f448df72ef82459e55d4ec52 (diff)
downloadCMake-9517ab36e19e9b4566425005433d20f21d01cd72.zip
CMake-9517ab36e19e9b4566425005433d20f21d01cd72.tar.gz
CMake-9517ab36e19e9b4566425005433d20f21d01cd72.tar.bz2
cmELF: correct error message from GetDynamicSectionString
Fixes: #25929
Diffstat (limited to 'Source/cmELF.cxx')
-rw-r--r--Source/cmELF.cxx14
1 files changed, 13 insertions, 1 deletions
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<Types>::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;
}