public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* __initcall macros and C token pasting
@ 2004-09-25 17:57 Jon Smirl
  2004-09-25 18:32 ` viro
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Smirl @ 2004-09-25 17:57 UTC (permalink / raw)
  To: lkml

#define DRM(x) r128_##x
module_init( DRM(init) );

#define __define_initcall(level,fn) \
        static initcall_t __initcall_##fn __attribute_used__ \
        __attribute__((__section__(".initcall" level ".init"))) = fn

This gives the error:
{standard input}: Assembler messages:
{standard input}:104: Error: junk at end of line, first unrecognized
character is `('

I believe this is because the C macro is not being expanded in the
assembler context of the section with the fn assignment.

Any ideas on how to fix this?

-- 
Jon Smirl
jonsmirl@gmail.com

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

end of thread, other threads:[~2004-09-26 19:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-25 17:57 __initcall macros and C token pasting Jon Smirl
2004-09-25 18:32 ` viro
2004-09-25 18:40   ` Jon Smirl
2004-09-25 19:17   ` Jon Smirl
2004-09-26 17:21     ` Olivier Galibert
2004-09-26 17:24       ` Tonnerre
2004-09-26 17:42         ` Christoph Hellwig
2004-09-26 19:56         ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox