Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: ray carter Newsgroups: comp.lang.c,comp.sys.raspberry-pi,comp.programming Subject: Re: Compile Assembly and C files together Date: 6 Mar 2018 15:44:57 GMT Lines: 17 Message-ID: References: <1b658afd-6921-4185-a680-d73f28a95d71@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net JafonWkRrnQAcQ4XI26FQQHCjG/0IpT2fM1exiIc8f84x/L6Oe Cancel-Lock: sha1:Mu3LYcdpEMF34fL2loDl28MUEIU= User-Agent: Pan/0.141 (Tarzan's Death; 168b179 git.gnome.org/pan2) Xref: csiph.com comp.lang.c:127386 comp.sys.raspberry-pi:16597 comp.programming:8395 On Tue, 06 Mar 2018 19:20:45 +0800, Mr. Man-wai Chang wrote: > On 6/3/2018 00:23, Ilias Abrams wrote: >> Hi guys, can a kindly soul explain to me how I can compile a .c file >> with an .asm file together on a RPI 2? I have an assembly file that I >> am calling a function through a C code. What I need to do now so I can >> combine and compile both files togethe > > You talking about inline Assembly? You could the ASM compiler directive? > > Or a makefile including an external ASM source file? The latter scenario > needs an external assembly compiler. Why do you need to 'compile them together'? Assemble to asm to make an object file, compile the c to make an object file and then, assuming you have the calling sequences correct, link them together to make the executable.