From 1b7dd32e8ff6aeb0d5529a9ee3e6c5930c03ff5d Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Thu, 11 Jan 2007 20:11:51 +0000 Subject: [PATCH] In struct _SegInfo, rename field 'offset' to 'text_bias'. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6507 --- coregrind/m_debuginfo/debuginfo.c | 2 +- coregrind/m_debuginfo/priv_storage.h | 13 +++++++------ coregrind/m_debuginfo/readelf.c | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 153bc23723..829e199c91 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -1104,7 +1104,7 @@ const UChar* VG_(seginfo_filename)(const SegInfo* si) ULong VG_(seginfo_sym_offset)(const SegInfo* si) { - return si->offset; + return si->text_bias; } VgSectKind VG_(seginfo_sect_kind)(Addr a) diff --git a/coregrind/m_debuginfo/priv_storage.h b/coregrind/m_debuginfo/priv_storage.h index fed610e5f0..7ee4ce25d4 100644 --- a/coregrind/m_debuginfo/priv_storage.h +++ b/coregrind/m_debuginfo/priv_storage.h @@ -146,7 +146,7 @@ struct _SegInfo { UInt size; UChar* filename; /* in mallocville */ UChar* memname; /* malloc'd. AIX5 only: .a member name */ - OffT foffset; + OffT foffset; /* file offset for mapped text section - UNUSED */ UChar* soname; /* An expandable array of symbols. */ @@ -174,11 +174,12 @@ struct _SegInfo { UChar strtab[SEGINFO_STRCHUNKSIZE]; } *strchunks; - /* 'offset' is what needs to be added to an address in the address - space of the library as stored on disk (which is not 0-based for - executables or prelinked libraries) to get an address in memory - for the object loaded at 'start' */ - OffT offset; + /* 'text_bias' is what needs to be added to an address in the + address space of the library as stored on disk [a so-called + stated VMA] (which is not 0-based for executables or prelinked + libraries) to get an address in memory for the object loaded at + 'text_start_avma'. At least for text symbols. */ + OffT text_bias; /* Bounds of data, BSS, PLT, GOT and OPD (for ppc64-linux) so that tools can see what section an address is in. In the running diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c index 5529e410a2..bf66362a88 100644 --- a/coregrind/m_debuginfo/readelf.c +++ b/coregrind/m_debuginfo/readelf.c @@ -979,7 +979,7 @@ Bool ML_(read_elf_debug_info) ( struct _SegInfo* si ) } } - si->offset = offset_oimage; + si->text_bias = offset_oimage; /* If, after looking at all the program headers, we still didn't find a soname, add a fake one. */ -- 2.47.2