summaryrefslogtreecommitdiff
path: root/linker/linker.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-08-30 09:02:33 -0700
committerElliott Hughes <enh@google.com>2017-08-30 09:02:33 -0700
commit6eae4cc57bf6672ec5ecb3cae3bdc6827009531f (patch)
tree723aed7c5531e95770c7645965ecaa1c350b83b0 /linker/linker.cpp
parent0d5d0746e8b88dab66038d6150cb92b62467aac1 (diff)
Explicitly name DT_RPATH.
The specific case of finding a DT_RPATH entry is a pretty common harmless warning. An alternative to this change would be to just add a case to the switch for DT_RPATH to just silently ignore it, since it's never been supported and is deprecated anyway. Bug: N/A Test: builds Change-Id: I01986da8f1f8d411fc2ea32d492c53b9f4488c72
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r--linker/linker.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 59e4bac69..58a52d05b 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -3211,8 +3211,23 @@ bool soinfo::prelink_image() {
default:
if (!relocating_linker) {
- DL_WARN("\"%s\" unused DT entry: type %p arg %p", get_realpath(),
- reinterpret_cast<void*>(d->d_tag), reinterpret_cast<void*>(d->d_un.d_val));
+ const char* tag_name;
+ if (d->d_tag == DT_RPATH) {
+ tag_name = "DT_RPATH";
+ } else if (d->d_tag == DT_ENCODING) {
+ tag_name = "DT_ENCODING";
+ } else if (d->d_tag >= DT_LOOS && d->d_tag <= DT_HIOS) {
+ tag_name = "unknown OS-specific";
+ } else if (d->d_tag >= DT_LOPROC && d->d_tag <= DT_HIPROC) {
+ tag_name = "unknown processor-specific";
+ } else {
+ tag_name = "unknown";
+ }
+ DL_WARN("\"%s\" unused DT entry: %s (type %p arg %p)",
+ get_realpath(),
+ tag_name,
+ reinterpret_cast<void*>(d->d_tag),
+ reinterpret_cast<void*>(d->d_un.d_val));
}
break;
}