summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1998-08-08 10:22:33 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1998-08-08 10:22:33 +0000
commit63be4e8d2bdb08ebfd3ac504b2bb30d02dd8cd18 (patch)
tree948773e8b117b58ae8bef1e478be9d8ea37d9581
parent94dd3b14721010053596a7e443b55dc3fbb0653d (diff)
MAJ nouveau format d'executables
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2038 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rwxr-xr-xtools/ocamlsize10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/ocamlsize b/tools/ocamlsize
index 298191688..7383d28df 100755
--- a/tools/ocamlsize
+++ b/tools/ocamlsize
@@ -10,9 +10,13 @@ foreach $f (@ARGV) {
$symbol_size = do read_int();
$debug_size = do read_int();
read(FILE, $magic, 12);
- seek(FILE, -($path_size + $code_size + $prim_size + $data_size +
- $symbol_size + $debug_size + 36), 2);
- read(FILE, $path, $path_size);
+ if ($path_size > 0) {
+ seek(FILE, -($path_size + $code_size + $prim_size + $data_size +
+ $symbol_size + $debug_size + 36), 2);
+ read(FILE, $path, $path_size);
+ } else {
+ $path = "(default runtime)\n";
+ }
print $f, ":\n" if ($#ARGV > 0);
printf ("\tcode: %d data: %d symbols: %d debug: %d\n",
$code_size, $data_size, $symbol_size, $debug_size);