public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* OSF/1 Binary format?
@ 1999-12-06 22:00 Scott Venier
  1999-12-06 22:17 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Scott Venier @ 1999-12-06 22:00 UTC (permalink / raw)
  To: binutils

Hello.  I just joined this list, so forgive me if this is something that's
either trivial or off topic, but I have been searching and this appears to
be the best place to ask...
 
I have a simulator that takes OSF/1 binaries and simulates their
execution.  I've been working to port this simulator to linux on alpha,
and have only one last(?) problem - the format of the input binary.  It
expects an a.out (I think.  It uses the default format on an OSF/1 V3.2
machine) but I can't seem to generate an a.out file on linux.
 
I have (correctly?) created an a.out-alpha backend for BFD, but I haven't
been able to write a program to convert elf binaries using it.  Is there
any doccumentation out there on writing such a program?

I tried rebuilding egcs and the binutils to the alpha-linuxecoff
target.  Looking at <asm/a.out.h> seemed to indicate that OSF/1 actually
uses ecoff binaries, not a.out.  I get the error at the end of this
message when building egcs.  Is that because I don't have a crt0.o?  Where
can I find one?  I checked out the current glibc but didn't see a crt0.S
for alpha in there.
 
Thanks in advance for your help.
 
Scott
 
 
gcc -DCROSS_COMPILE -DIN_GCC    -g -O2  -DHAVE_CONFIG_H  -o cc1 toplev.o
version.o tree.o print-tree.o stor-layout.o fold-const.o function.o stmt.o
except.o expr.o calls.o expmed.o explow.o optabs.o real.o builtins.o
intl.o varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o genrtl.o dbxout.o
sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o gcse.o
integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o
varray.o regclass.o regmove.o local-alloc.o global.o reload.o reload1.o
caller-save.o insn-peep.o reorg.o haifa-sched.o final.o recog.o
reg-stack.o insn-opinit.o insn-recog.o insn-extract.o insn-output.o
insn-emit.o lcm.o profile.o insn-attrtab.o alpha.o  convert.o mbchar.o
dyn-string.o splay-tree.o graph.o sbitmap.o resource.o hash.o lists.o
ggc-common.o ggc-page.o simplify-rtx.o c-parse.o c-lang.o c-lex.o
c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o
c-iterate.o  obstack.o        ../libiberty/libiberty.a
toplev.o: In function `compile_file':
/570/scottven/newest/egcs/gcc/toplev.c:3131: undefined reference to
`ASM_FILE_START'
/570/scottven/newest/egcs/gcc/toplev.c:3131: undefined reference to
`ASM_FILE_START'
collect2: ld returned 1 exit status
make[3]: *** [cc1] Error 1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: OSF/1 Binary format?
  1999-12-06 22:00 OSF/1 Binary format? Scott Venier
@ 1999-12-06 22:17 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 1999-12-06 22:17 UTC (permalink / raw)
  To: scott; +Cc: binutils

   Date: Tue, 7 Dec 1999 01:00:06 -0500 (EST)
   From: Scott Venier <scott@compu-aid.com>

   I have a simulator that takes OSF/1 binaries and simulates their
   execution.  I've been working to port this simulator to linux on alpha,
   and have only one last(?) problem - the format of the input binary.  It
   expects an a.out (I think.  It uses the default format on an OSF/1 V3.2
   machine) but I can't seem to generate an a.out file on linux.

As you have discovered, OSF/1 uses ECOFF.  To produce a cross-compiler
for OSF/1 ECOFF, configure with something like --target
alpha-dec-osf3.2.

However, note that the GNU binutils do not fully support OSF/1.  In
particular, they do not support shared libraries.  Therefore, this
approach is likely to have some problems.

   I tried rebuilding egcs and the binutils to the alpha-linuxecoff
   target.  Looking at <asm/a.out.h> seemed to indicate that OSF/1 actually
   uses ecoff binaries, not a.out.  I get the error at the end of this
   message when building egcs.  Is that because I don't have a crt0.o?  Where
   can I find one?  I checked out the current glibc but didn't see a crt0.S
   for alpha in there.

I don't know whether glibc supports ECOFF.  It may only support ELF.

   toplev.o: In function `compile_file':
   /570/scottven/newest/egcs/gcc/toplev.c:3131: undefined reference to
   `ASM_FILE_START'
   /570/scottven/newest/egcs/gcc/toplev.c:3131: undefined reference to
   `ASM_FILE_START'

This is a problem with gcc, not the binutils.  ASM_FILE_START should
be a macro defined somewhere in the gcc tm.h file.  You need to ask on
a gcc mailing list about this.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-12-06 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-06 22:00 OSF/1 Binary format? Scott Venier
1999-12-06 22:17 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).