From d7b12c622c06fd592b74a8ac4eb4fbdac42699b5 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 6 Apr 2010 14:17:41 +0200 Subject: [PATCH] Fix for the same * Initialize data.s for data that do not need a conversion. --- libelf/ChangeLog | 5 +++++ libelf/elf_getdata.c | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/libelf/ChangeLog b/libelf/ChangeLog index b0cff67c3..1fbdf4ccf 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,8 @@ +2010-04-01 Petr Machata + + * elf_getdata.c (__elf_getdata_rdlock): Initialize data.s for data + that do not need a conversion. + 2010-03-11 Roland McGrath * elf.h: Update from glibc. diff --git a/libelf/elf_getdata.c b/libelf/elf_getdata.c index e083b033f..5a718f82e 100644 --- a/libelf/elf_getdata.c +++ b/libelf/elf_getdata.c @@ -467,9 +467,12 @@ __elf_getdata_rdlock (scn, data) scn->rawdata.d.d_size, scn->rawdata.d.d_type); } else - /* This is an empty or NOBITS section. There is no buffer but - the size information etc is important. */ - scn->data_list.data.d = scn->rawdata.d; + { + /* This is an empty or NOBITS section. There is no buffer but + the size information etc is important. */ + scn->data_list.data.d = scn->rawdata.d; + scn->data_list.data.s = scn; + } scn->data_list_rear = &scn->data_list; } -- 2.39.5