From 4e8f5fa43b16a5fb267dc41231e28d9497157639 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 22 Jul 2019 20:04:14 -0700 Subject: 5454 Bugfix fifteen -- on the C++ side. --- subx/034compute_segment_address.cc | 2 +- subx/apps/crenshaw2-1 | Bin 24734 -> 24734 bytes subx/apps/crenshaw2-1b | Bin 25293 -> 25293 bytes subx/apps/factorial | Bin 23650 -> 23650 bytes subx/apps/handle | Bin 24509 -> 24509 bytes subx/apps/hex | Bin 27743 -> 27743 bytes subx/apps/survey | Bin 43841 -> 43841 bytes subx/examples/ex1 | Bin 8 files changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 subx/examples/ex1 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 Binary files a/subx/apps/crenshaw2-1 and b/subx/apps/crenshaw2-1 differ diff --git a/subx/apps/crenshaw2-1b b/subx/apps/crenshaw2-1b index 51919217..c0eae5f9 100755 Binary files a/subx/apps/crenshaw2-1b and b/subx/apps/crenshaw2-1b differ diff --git a/subx/apps/factorial b/subx/apps/factorial index 311ef05c..c015a3c9 100755 Binary files a/subx/apps/factorial and b/subx/apps/factorial differ diff --git a/subx/apps/handle b/subx/apps/handle index 63f7511b..f098c715 100755 Binary files a/subx/apps/handle and b/subx/apps/handle differ diff --git a/subx/apps/hex b/subx/apps/hex index f3ad62f1..ff5d30b5 100755 Binary files a/subx/apps/hex and b/subx/apps/hex differ diff --git a/subx/apps/survey b/subx/apps/survey index 6a32a1e1..2f5885fe 100755 Binary files a/subx/apps/survey and b/subx/apps/survey differ diff --git a/subx/examples/ex1 b/subx/examples/ex1 old mode 100755 new mode 100644 -- cgit 1.4.1-2-gfad0