[RFC 1/3] add support for exporting symbols from .S files
Stephen Rothwell
sfr at canb.auug.org.au
Tue Aug 12 16:43:52 EST 2008
Hi Arnd,
On Mon, 11 Aug 2008 16:18:07 +0200 Arnd Bergmann <arnd at arndb.de> wrote:
>
> +#ifdef CONFIG_MODULES
> +.macro __EXPORT_SYMBOL sym section symtab strtab
> + .section \section,"a", at 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 at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080812/11a29c9e/attachment.pgp>
More information about the Linuxppc-dev
mailing list