lkml.org 
[lkml]   [2008]   [Aug]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 12 Aug 2008 16:43:52 +1000
FromStephen Rothwell <>
SubjectRe: [RFC 1/3] add support for exporting symbols from .S files
Hi Arnd,

On Mon, 11 Aug 2008 16:18:07 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
>
> +#ifdef CONFIG_MODULES
> +.macro __EXPORT_SYMBOL sym section symtab strtab
> +	.section \section,"a",@progbits
> +	.type \symtab, @object
> +	.ifeq BITS_PER_LONG-32
> +	.align 3
> +\symtab:
> +	.long \sym
> +	.long \strtab
> +	.else
> +	.align 4

This won't be portable across architectures as .align is sometimes in
bytes and sometimes a power of two.  You can use .balign or .p2align
portably on gas, though. 

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-08-12 08:47    [from the cache]
©2003-2008