about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-22 20:04:14 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-22 20:04:14 -0700
commit4e8f5fa43b16a5fb267dc41231e28d9497157639 (patch)
treedc520332d77a7042b42ff0af8073bea79c77fe98 /subx
parentc4ccc215cf213cf134d34bebee334b9a32a75967 (diff)
downloadmu-4e8f5fa43b16a5fb267dc41231e28d9497157639.tar.gz
5454
Bugfix fifteen -- on the C++ side.
Diffstat (limited to 'subx')
-rw-r--r--subx/034compute_segment_address.cc2
-rwxr-xr-xsubx/apps/crenshaw2-1bin24734 -> 24734 bytes
-rwxr-xr-xsubx/apps/crenshaw2-1bbin25293 -> 25293 bytes
-rwxr-xr-xsubx/apps/factorialbin23650 -> 23650 bytes
-rwxr-xr-xsubx/apps/handlebin24509 -> 24509 bytes
-rwxr-xr-xsubx/apps/hexbin27743 -> 27743 bytes
-rwxr-xr-xsubx/apps/surveybin43841 -> 43841 bytes
-rw-r--r--[-rwxr-xr-x]subx/examples/ex1bin128 -> 128 bytes
8 files changed, 1 insertions, 1 deletions
diff --git a/subx/034compute_segment_address.cc b/subx/034compute_segment_address.cc
index 9eb1615d..61c3739a 100644
--- a/subx/034compute_segment_address.cc
+++ b/subx/034compute_segment_address.cc
@@ -37,7 +37,7 @@ void compute_segment_starts(program& p) {
     if (curr.start >= 0x08000000) {
       // valid address for user space, so assume we're creating a real ELF binary, not just running a test
       curr.start &= 0xfffff000;  // same number of zeros as the p_align used when emitting the ELF binary
-      curr.start |= p_offset;
+      curr.start |= (p_offset & 0xfff);
       trace(99, "transform") << "segment " << i << " begins at address 0x" << HEXWORD << curr.start << end();
     }
     p_offset += size_of(curr);
diff --git a/subx/apps/crenshaw2-1 b/subx/apps/crenshaw2-1
index d4593a77..93183803 100755
--- a/subx/apps/crenshaw2-1
+++ b/subx/apps/crenshaw2-1
Binary files differdiff --git a/subx/apps/crenshaw2-1b b/subx/apps/crenshaw2-1b
index 51919217..c0eae5f9 100755
--- a/subx/apps/crenshaw2-1b
+++ b/subx/apps/crenshaw2-1b
Binary files differdiff --git a/subx/apps/factorial b/subx/apps/factorial
index 311ef05c..c015a3c9 100755
--- a/subx/apps/factorial
+++ b/subx/apps/factorial
Binary files differdiff --git a/subx/apps/handle b/subx/apps/handle
index 63f7511b..f098c715 100755
--- a/subx/apps/handle
+++ b/subx/apps/handle
Binary files differdiff --git a/subx/apps/hex b/subx/apps/hex
index f3ad62f1..ff5d30b5 100755
--- a/subx/apps/hex
+++ b/subx/apps/hex
Binary files differdiff --git a/subx/apps/survey b/subx/apps/survey
index 6a32a1e1..2f5885fe 100755
--- a/subx/apps/survey
+++ b/subx/apps/survey
Binary files differdiff --git a/subx/examples/ex1 b/subx/examples/ex1
index aeb62302..aeb62302 100755..100644
--- a/subx/examples/ex1
+++ b/subx/examples/ex1
Binary files differ