OSDN Git Service

bionic: Change the type of soinfo's size to size_t
authorWeiwu Chen <weiwu.chen@intel.com>
Tue, 3 Dec 2013 11:47:34 +0000 (19:47 +0800)
committerElliott Hughes <enh@google.com>
Tue, 28 Jan 2014 19:54:01 +0000 (11:54 -0800)
Some system functions like munmap expect soinfo's size to be size_t, but currently
it is unsigned. Change it to size_t to fit 64bit's portability.

Change-Id: I0bf6d522b38b0cd9bf1db05b004b5326217412a2
Signed-off-by: Weiwu Chen <weiwu.chen@intel.com>
Signed-off-by: Qiming Shi <qiming.shi@intel.com>
linker/linker.cpp
linker/linker.h

index f58e222..9bc9afe 100755 (executable)
@@ -783,7 +783,7 @@ static soinfo* find_library_internal(const char* name) {
 
   // At this point we know that whatever is loaded @ base is a valid ELF
   // shared library whose segments are properly mapped in.
-  TRACE("[ init_library base=%p sz=0x%08x name='%s' ]",
+  TRACE("[ find_library_internal base=%p size=%zu name='%s' ]",
         reinterpret_cast<void*>(si->base), si->size, si->name);
 
   if (!soinfo_link_image(si)) {
index 67a86ab..972050f 100644 (file)
@@ -106,7 +106,7 @@ struct soinfo {
   size_t phnum;
   Elf_Addr entry;
   Elf_Addr base;
-  unsigned size;
+  size_t size;
 
 #ifndef __LP64__
   uint32_t unused1;  // DO NOT USE, maintained for compatibility.