Re: Unrecognized binary format?
Ossama Othman <othman@astrosun.tn.cornell.edu> writes:
> Hi,
>
> > What does 'file <myprog' say? the g++ may be adding a messed up header.
>
> Well, I am floored. :)
>
> It seems that the "compiled" program is a Bourne Shell script, according
> to the file program. I confirmed this by viewing the contents of my
> "executable." It turns out that the binary/script was generated by
> libtool to prevent anyone from running the actual program before the
> shared library it depends on was installed. The actual executable resides
> in the .libs directory of that same directory. I didn't know that libtool
> does this for programs, in addition to the libraries it generates. Neato!
>
> Sorry for the panic. :)
>
> Thanks for the tip on using "file," Shaleh. That helped me figure out
> what was going on. Isn't libtool great!
>
> By the way, this was a test program for a package I am creating (ACE).
To debug a libtool program in the build tree, you have to do
$(top_builddir)/libtool --mode=execute gdb PROGRAM_NAME
Where $(top_builddir) is the path to where the `libtool' script in the
build tree. You can of course replace `gdb' above with your favourite
debugger (including ldd).
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash
Reply to: