Commit 2d15cd07 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Andrei Vagin

compel handle-elf.c: better align generated output

This is purely cosmetical, no functional change.

1. Make sure relocs table is well aligned.

2. printf("%#02x", 1) prints 0x01, but for 0 it prints 0,
   not 0x00 as one would expect, so output is somewhat ugly.
   Use "0x%02x" format instead to make it more uniform and
   well aligned.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent bd22ff2a
...@@ -573,7 +573,7 @@ int __handle_elf(void *mem, size_t size) ...@@ -573,7 +573,7 @@ int __handle_elf(void *mem, size_t size)
for (j = 0; j < sh->sh_size; j++, k++) { for (j = 0; j < sh->sh_size; j++, k++) {
if (k && (k % 8) == 0) if (k && (k % 8) == 0)
pr_out("\n\t"); pr_out("\n\t");
pr_out("%#02x,", shdata[j]); pr_out("0x%02x,", shdata[j]);
} }
} }
pr_out("};\n"); pr_out("};\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment