Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] "No bytecode specified"
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: malc <malc@p...>
Subject: Re: [Caml-list] "No bytecode specified"
On Mon, 26 Aug 2002, Sven LUTHER wrote:

> Alternatively, strip can be fixed to know about ocaml bytecode.
> 
> I was also told that if the ocaml team would have used another
> label/tag/whatever it is called in the binary code than the one it is
> using, then strip would know about it. But then, i am not expert on
> that, and i guess the ocaml team don't think it is a good idea, since i
> never got any response to the message i sent about it (back when i was
> told that).
Either that, or:

#!/bin/sh

elfsize=`readelf -h $1 | awk '
/Start of section headers:/ {secoff=$5}
/Size of section headers:/ {seclen=$5}
/Number of section headers:/ {seccnt=$5}
END { print seccnt*seclen+secoff; }
'`
filesize=`ls -l $1 | awk '{print $5}'`

strip -o $1.elf.striped $1
tail -c $[filesize-elfsize] $1 > $1.caml.striped
cat $1.elf.striped $1.caml.striped > $1.striped
chmod +x $1.striped

rm -f $1.elf.striped $1.caml.striped


-- 
mailto:malc@pulsesoft.com

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners