Re: [PATCH] Modules 3/3: Sort sections

From: Richard Henderson (rth@twiddle.net)
Date: Wed Jan 01 2003 - 23:54:04 EST


On Thu, Jan 02, 2003 at 02:00:27PM +1100, Rusty Russell wrote:
> + /* Find .plt and .pltinit sections */

Typo.

> +/* Make empty sections for module_frob_arch_sections to expand. */
> +#ifdef MODULE
> +asm(".section .plt,\"aws\",@nobits; .align 3; .previous");
> +asm(".section .plt.init,\"aws\",@nobits; .align 3; .previous");

Should use "ax", do make the plt sections executable,
since the plt section contains code that branches.
Additionally, this will place the .plt section next
to .text, which improves icache usage, and minimizes
the branch distance.

Incidentally, why do we do strstr(name, ".init") instead
of strncmp(name, ".init", 5)? Is there any particular
need for the .init to come at the end?

r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:16 EST