Re: [PATCH 1/3] module: deal with alignment issues in built-inmodule versions

From: David Miller
Date: Thu Feb 17 2011 - 17:22:50 EST


From: Dmitry Torokhov <dtor@xxxxxxxxxx>
Date: Thu, 17 Feb 2011 14:19:57 -0800

> Any pointers as to how to emit these pointers with asm?

.section FOO_SECTION, "a"
.align SIZEOF_POINTER
.{,x}word POINTER
.previous

Where FOO_SECTION is your special section name, SIZEOF_POINTER is
sizeof(void *), and POINTER is the pointer you want to add to the
section.

You have to also pick .word vs. .xword, or whatever the appropriate
sized pointer mnenomic is for a given architecture. I know .word
works for 32-bit sparc, and .xword works for 64-bit sparc.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/