All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: sparclinux@vger.kernel.org
Subject: Re: Linker script cleanup / consolidation
Date: Tue, 29 May 2007 18:41:39 +0000	[thread overview]
Message-ID: <20070529184139.GA5846@uranus.ravnborg.org> (raw)
In-Reply-To: <20070524200934.GB1109@uranus.ravnborg.org>

On Mon, May 28, 2007 at 11:00:29PM -0700, David Miller wrote:
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Mon, 28 May 2007 20:53:36 +0200
> 
> > First off. I tried building a sparc64 kernel from -linus using
> > defconfig and got no section mismatch warnings.
> 
> Turn on SMP. :-)
In trampoline.S moved all code to .init.text and got this:
WARNING: arch/sparc64/kernel/built-in.o(.sun4v_1insn_patch+0x8): Section mismatch: reference to .init.text:
WARNING: arch/sparc64/kernel/built-in.o(.sun4v_1insn_patch+0x10): Section mismatch: reference to .init.text:
WARNING: arch/sparc64/kernel/built-in.o(.sun4v_1insn_patch+0x18): Section mismatch: reference to .init.text:
WARNING: arch/sparc64/kernel/built-in.o(.cpuid_patch+0x0): Section mismatch: reference to .init.text:

It is trivial to ignore all references from a section named *_patch to .init.text
But grepping linker script files for all other archs this does not look like
a common namespace.

modpost has today following list of sections that may reference .init.text
without causing a warning:

	const char *namelist1[] = {
		".init",
		".opd",   /* see comment [OPD] at exit_section_ref_ok() */
		".toc1",  /* used by ppc64 */
		".stab",
		".data.rel.ro", /* used by parisc64 */
		".parainstructions",
		".text.lock",
		"__bug_table", /* used by powerpc for BUG() */
		".pci_fixup_header",
		".pci_fixup_final",
		".pdr",
		"__param",
		"__ex_table",
		".fixup",
		".smp_locks",
		".plt",  /* seen on ARCH=um build on x86_64. Harmless */
		"__ftr_fixup",		/* powerpc cpu feature fixup */
		"__fw_ftr_fixup",	/* powerpc firmware feature fixup */
		NULL
	};

	/* Start of section names */
	const char *namelist2[] = {
		".init.",
		".altinstructions",
		".eh_frame",
		".debug",
		".parainstructions",
		".rodata",
		NULL


So adding a third section that allow references from sections named *_patch is no big deal.
Let me know if you stick to that namespace and I will add it to modpost.

	Sam

  parent reply	other threads:[~2007-05-29 18:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24 20:09 Linker script cleanup / consolidation Sam Ravnborg
2007-05-24 20:45 ` David Miller
2007-05-24 21:15 ` Sam Ravnborg
2007-05-24 21:16 ` David Miller
2007-05-28 18:53 ` Sam Ravnborg
2007-05-29  6:00 ` David Miller
2007-05-29 18:41 ` Sam Ravnborg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-05-24 20:04 Sam Ravnborg

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=20070529184139.GA5846@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=sparclinux@vger.kernel.org \
    /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.