i want to link several source files together into one bytecode file
without gcc performing any optimizations. first step:llvmgcc -c -S code.c
which produces a code.s file. next i tried:
as code.s
but that produced a .bc file instead of the .o file i was hoping for.
".bc" and ".o" files are identical in contents, they just differ in
suffix.
can i link the .bc file in with other object files, eg:
llvmgcc -o code stuff.o code.s.bc
That will do more than you want. It will link in the standard C libraries
and some other support stuff, using the gccld utility. If you _just_ want
to link the two bytecode files together into a new bytecode file, use the
'link' utility like this:
link stuff.o code.s.bc -o out.bc
-Chris