This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to use C style directives in assembler ?
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: weiguixm <623674292 at qq dot com>, gcc-help at gcc dot gnu dot org
- Date: Thu, 22 Oct 2015 10:18:41 +0200
- Subject: Re: How to use C style directives in assembler ?
- Authentication-results: sourceware.org; auth=none
- References: <1445495911645-1197042 dot post at n5 dot nabble dot com>
On 22/10/15 08:38, weiguixm wrote:
I'm reading u-boot sourc code recently. I found it uses C style directives
(#define #ifdef and etc.)in assemble files. But the assembler only
recognize directives like .ifdef .define by default. I guess there is some
command line options of the assembler to make it recognize C style
directives instead of the default one. It will be appreciate if some one
could tell me how to deal with this issue.
You can use the "gcc" program to invoke the C pre-processor and the
assembler. You can also call the C pre-processor directly and pass its
output to the assembler.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.