summaryrefslogtreecommitdiff
path: root/rld-rap.cpp
diff options
context:
space:
mode:
authorPeng Fan <van.freenix@gmail.com>2013-08-01 16:15:07 +0800
committerPeng Fan <van.freenix@gmail.com>2013-08-01 16:15:07 +0800
commit370435add497e97985d184b282a0b60413c3f9ca (patch)
tree811a70518edfcc07b1eb5002d15f858fdf188d02 /rld-rap.cpp
parentd628321500c7846622275ecdf88e8f7229822fa1 (diff)
Add section size for rap details
Add elf section size to the section details, because gdb will use the size of a section.
Diffstat (limited to 'rld-rap.cpp')
-rw-r--r--rld-rap.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/rld-rap.cpp b/rld-rap.cpp
index e1365b3..99bc4a3 100644
--- a/rld-rap.cpp
+++ b/rld-rap.cpp
@@ -161,9 +161,10 @@ namespace rld
uint32_t name; //< The offset in the strtable.
uint32_t offset; //< The offset in the rap section.
uint32_t id; //< The rap id.
+ uint32_t size; //< The size of the section.
/* Constructor */
- section_detail (uint32_t name, uint32_t offset, uint32_t id);
+ section_detail (uint32_t name, uint32_t offset, uint32_t id, uint32_t size);
};
/*
@@ -481,10 +482,12 @@ namespace rld
section_detail::section_detail (uint32_t name,
uint32_t offset,
- uint32_t id)
+ uint32_t id,
+ uint32_t size)
: name (name),
offset (offset),
- id (id)
+ id (id),
+ size (size)
{
}
@@ -1486,7 +1489,10 @@ namespace rld
strtable += '\0';
/* sec.offset + osec.offset is the offset in the rap section */
- s_details.push_back (section_detail (pos, sec.offset + osec.offset, s));
+ s_details.push_back (section_detail (pos,
+ sec.offset + osec.offset,
+ s,
+ osec.size));
pos = strtable.length ();
@@ -1523,6 +1529,7 @@ namespace rld
std::cout << "Out max rap section id 15\n" << std::endl;
comp << (uint32_t)((sec_detail.id << 28) | sec_detail.offset);
+ comp << (uint32_t)(sec_detail.size);
}
}