]> granicus.if.org Git - yasm/commitdiff
Bin map file: Fix incorrect address printing for symbols.
authorPeter Johnson <peter@tortall.net>
Thu, 3 Jul 2008 04:19:12 +0000 (04:19 -0000)
committerPeter Johnson <peter@tortall.net>
Thu, 3 Jul 2008 04:19:12 +0000 (04:19 -0000)
We were printing the previous bytecode's start rather than the label's
bytecode.  Use yasm_bc_next_offset() to get the correct offset.

svn path=/trunk/yasm/; revision=2110

modules/objfmts/bin/bin-objfmt.c
modules/objfmts/bin/tests/multisect/multisect1.map
modules/objfmts/bin/tests/multisect/multisect2.map

index 3d69a2dbbd61f57812fa682f85b92c1c2d7048ed..fc283d71520f36839662d3d82e0b294856b56a56 100644 (file)
@@ -681,13 +681,13 @@ map_symrec_output(yasm_symrec *sym, void *d)
             yasm_section_get_data(info->section, &bin_section_data_cb);
 
         /* Real address */
-        yasm_intnum_set_uint(info->intn, precbc->offset);
+        yasm_intnum_set_uint(info->intn, yasm_bc_next_offset(precbc));
         yasm_intnum_calc(info->intn, YASM_EXPR_ADD, bsd->istart);
         map_print_intnum(info->intn, info);
         fprintf(info->f, "  ");
 
         /* Virtual address */
-        yasm_intnum_set_uint(info->intn, precbc->offset);
+        yasm_intnum_set_uint(info->intn, yasm_bc_next_offset(precbc));
         yasm_intnum_calc(info->intn, YASM_EXPR_ADD, bsd->ivstart);
         map_print_intnum(info->intn, info);
 
index 68cb155ea5c1f2d077d9bf70c9f7e2d994399a37..0a56e413be307b9dd224c7099fcc1d4d52ea3f4f 100644 (file)
@@ -73,6 +73,6 @@ Real      Virtual   Name
 ---- Section .bss -------------------------------------------------------------
 
 Real      Virtual   Name
-00000020  00000020  stack_ends
+00000420  00000420  stack_ends
 
 
index b3cb273ed7e44dc8298ffcb7e950d71f06bc21cc..82002edb4abc90fb4d7dd440bada16d0525f73d3 100644 (file)
@@ -55,9 +55,9 @@ vfollows:  not defined
 ---- Section .text ------------------------------------------------------------
 
 Real      Virtual   Name
-0000010C  0000010C  showax
-0000010F  0000010F  showax.top
-0000011F  0000011F  showax.dec_dig
+0000010D  0000010D  showax
+00000112  00000112  showax.top
+00000122  00000122  showax.dec_dig
 
 
 ---- Section .data ------------------------------------------------------------