projects
/
ddsect.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ddsect.sh: fix calculating END_ADDRESS
[ddsect.git]
/
ddsect.sh
diff --git
a/ddsect.sh
b/ddsect.sh
index
b1c5122
..
1a27e5f
100755
(executable)
--- a/
ddsect.sh
+++ b/
ddsect.sh
@@
-34,11
+34,11
@@
parse_map_file()
do
RANGE=$(echo $line | cut -d ':' -f 1)
START_ADDRESS=$(( $(echo $RANGE | cut -d '-' -f 1) ))
do
RANGE=$(echo $line | cut -d ':' -f 1)
START_ADDRESS=$(( $(echo $RANGE | cut -d '-' -f 1) ))
- END_ADDRESS=$(( $(echo $RANGE | cut -d '-' -f 2) ))
+ END_ADDRESS=$(( $(echo $RANGE | cut -d '-' -f 2)
- 1
))
NAME=$(echo $line | cut -d ':' -f 2 | sed -e 's/^"//' -e 's/"$//')
NAME=$(echo $line | cut -d ':' -f 2 | sed -e 's/^"//' -e 's/"$//')
- SIZE=$(($END_ADDRESS - $START_ADDRESS))
+ SIZE=$(($END_ADDRESS - $START_ADDRESS
+ 1
))
SIZE_KiB=$(($SIZE / 1024))
SIZE_KiB=$(($SIZE / 1024))