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 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'subx/034compute_segment_address.cc') 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); -- cgit 1.4.1-2-gfad0