All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Richard Henderson <rth@twiddle.net>
Cc: paulus@samba.org, linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: [PATCH] Modules 3/3: Sort sections
Date: Thu, 02 Jan 2003 21:48:42 +1100	[thread overview]
Message-ID: <20030102105049.E532D2C267@lists.samba.org> (raw)
In-Reply-To: Your message of "Wed, 01 Jan 2003 20:54:04 -0800." <20030101205404.B30272@twiddle.net>

In message <20030101205404.B30272@twiddle.net> you write:
> 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.

OK, and I've renamed it to .init.plt, too.

Thanks!
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.54/arch/ppc/kernel/module.c working-2.5.54-ppcfix/arch/ppc/kernel/module.c
--- linux-2.5.54/arch/ppc/kernel/module.c	2003-01-02 14:47:57.000000000 +1100
+++ working-2.5.54-ppcfix/arch/ppc/kernel/module.c	2003-01-02 21:46:31.000000000 +1100
@@ -108,15 +108,15 @@ int module_frob_arch_sections(Elf32_Ehdr
 {
 	unsigned int i;
 
-	/* Find .plt and .pltinit sections */
+	/* Find .plt and .init.plt sections */
 	for (i = 0; i < hdr->e_shnum; i++) {
-		if (strcmp(secstrings + sechdrs[i].sh_name, ".plt.init") == 0)
+		if (strcmp(secstrings + sechdrs[i].sh_name, ".init.plt") == 0)
 			me->arch.init_plt_section = i;
 		else if (strcmp(secstrings + sechdrs[i].sh_name, ".plt") == 0)
 			me->arch.core_plt_section = i;
 	}
 	if (!me->arch.core_plt_section || !me->arch.init_plt_section) {
-		printk("Module doesn't contain .plt or .plt.init sections.\n");
+		printk("Module doesn't contain .plt or .init.plt sections.\n");
 		return -ENOEXEC;
 	}
 
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.54/include/asm-ppc/module.h working-2.5.54-ppcfix/include/asm-ppc/module.h
--- linux-2.5.54/include/asm-ppc/module.h	2003-01-02 14:48:00.000000000 +1100
+++ working-2.5.54-ppcfix/include/asm-ppc/module.h	2003-01-02 21:46:38.000000000 +1100
@@ -28,7 +28,7 @@ struct mod_arch_specific
 
 /* 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");
+asm(".section .plt,\"ax\",@nobits; .align 3; .previous");
+asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous");
 #endif
 #endif /* _ASM_PPC_MODULE_H */

  parent reply	other threads:[~2003-01-02 10:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-02  3:00 [PATCH] Modules 3/3: Sort sections Rusty Russell
2003-01-02  4:54 ` Richard Henderson
2003-01-02  4:50   ` David S. Miller
2003-01-02  4:58     ` Richard Henderson
2003-01-02  5:15       ` David S. Miller
2003-01-02 10:35         ` Rusty Russell
2003-01-02 17:39         ` Alan Cox
2003-01-02  9:36       ` Arjan van de Ven
2003-01-02  9:37         ` Richard Henderson
2003-01-02 10:48   ` Rusty Russell [this message]
2003-01-06  9:25 ` Miles Bader
2003-01-06 10:17   ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030102105049.E532D2C267@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=rth@twiddle.net \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.