This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] readelf and DT_RUNPATH


On 10/22/2009 08:25 AM, Thomas Cougnard wrote:
When processing the dynamic section and encountering a DT_RUNPATH
entry, the following code (readelf.c:6383)
        case DT_RUNPATH :
          dynamic_info[entry->d_tag] = entry->d_un.d_val;

corrupts version_info, since entry->d_tag is 29 and dynamic_info is

static bfd_vma dynamic_info[DT_JMPREL + 1];

with DT_JMPREL equals to 23.
> Proposed:
-static bfd_vma dynamic_info[DT_JMPREL + 1];
+static bfd_vma dynamic_info[DT_RUNPATH + 1];

The binutils mailing list just had a kerfluffle about DT_ENCODING: http://sourceware.org/ml/binutils/2009-10/msg00362.html

A better fix for DT_RUNPATH vs. readelf.c:6368 is:
> -static bfd_vma dynamic_info[DT_JMPREL + 1];
> +static bfd_vma dynamic_info[DT_ENCODING];

--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]