All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: todd_m_roy@vermontel.net
Cc: bregor@anusf.anu.edu.au, Kenneth Albanowski <kjahds@kjahds.com>,
	Mat Hostetter <mat@lcs.mit.edu>,
	Andy Dougherty <doughera@lafcol.lafayette.edu>,
	Warner Losh <imp@village.org>,
	linux-mips@oss.sgi.com, Ron Guilmette <rfg@monkeys.com>,
	"Polstra; John" <linux-binutils-in@polstra.com>,
	"Hazelwood; Galen" <galenh@micron.net>,
	Ralf Baechle <ralf@mailhost.uni-koblenz.de>,
	Linas Vepstas <linas@linas.org>,
	Feher Janos <aries@hal2000.terra.vein.hu>,
	Leonard Zubkoff <lnz@dandelion.com>,
	"Steven J. Hill" <sjhill@cotw.com>,
	linux-gcc@vger.kernel.org,
	GNU C Library <libc-alpha@sourceware.cygnus.com>,
	gcc@gcc.gnu.org
Subject: Re: Problem with binutils 2.11.92.0.12 and ..12.3
Date: Tue, 04 Dec 2001 23:17:27 -0800	[thread overview]
Message-ID: <3C0DCA07.AD302D7D@zip.com.au> (raw)
In-Reply-To: 20011201094659.A9044@lucon.org

"H . J . Lu" wrote:
> 
> On Fri, Nov 30, 2001 at 11:42:09PM -0500, Todd Roy, Wanda Salter and Alice Salter-Roy wrote:
> > Hi,
> >   I had a linux kernel linking problem with 2.11.92.0.12 and
> > 2.11.92.0.12.3
> ...
> >
> > I reverted to 2.11.92.0.10 and all is well again.
> >
> 
> I updated the release note for 2.11.92.0.12.3. Please read it carefully.
> 
> ...
> --- linux/arch/alpha/vmlinux.lds.in.discard     Thu Nov 22 00:30:16 2001
> +++ linux/arch/alpha/vmlinux.lds.in     Thu Nov 22 00:30:47 2001
> @@ -92,5 +92,5 @@ SECTIONS
>    .debug_typenames 0 : { *(.debug_typenames) }
>    .debug_varnames  0 : { *(.debug_varnames) }
> 
> -  /DISCARD/ : { *(.text.exit) *(.data.exit) }
> +  /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) }
>  }
> --- linux/drivers/char/serial.c.discard Thu Nov 22 00:37:14 2001
> +++ linux/drivers/char/serial.c Thu Nov 22 10:54:54 2001
> @@ -4887,7 +4887,9 @@ static char serial_pci_driver_name[] = "
>  static struct pci_driver serial_pci_driver = {
>         name:           serial_pci_driver_name,
>         probe:          serial_init_one,
> +#ifdef MODULE
>         remove:        serial_remove_one,
> +#endif
>         id_table:       serial_pci_tbl,
>  };
> 

This is not sufficient.  If CONFIG_HOTPLUG is defined,
__devinit sections are still included in vmlinux.  This
is because those functions are required for hot-unplugging.

This patch will cause hot-unplug for statically linked drivers
to not work correctly, because the ->remove() method isn't
available (it has a null pointer).

The ifdef needs to be:

#if defined(MODULE) || defined(CONFIG_HOTPLUG)

I've just send a patch, which alters 59 kernel files to
the kernel list.  It's for 2.4.17-pre2 and will hopefully
appear in 2.4.17-pre3.

The easiest fix for earlier kernels is to edit arch/i386/vmlinux.lds.in
and delete the entire /DISCARD/ section.

      reply	other threads:[~2001-12-05  8:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3C085FA1.CCDC7100@vermontel.net>
2001-12-01 17:46 ` Problem with binutils 2.11.92.0.12 and ..12.3 H . J . Lu
2001-12-05  7:17   ` Andrew Morton [this message]

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=3C0DCA07.AD302D7D@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=aries@hal2000.terra.vein.hu \
    --cc=bregor@anusf.anu.edu.au \
    --cc=doughera@lafcol.lafayette.edu \
    --cc=galenh@micron.net \
    --cc=gcc@gcc.gnu.org \
    --cc=imp@village.org \
    --cc=kjahds@kjahds.com \
    --cc=libc-alpha@sourceware.cygnus.com \
    --cc=linas@linas.org \
    --cc=linux-binutils-in@polstra.com \
    --cc=linux-gcc@vger.kernel.org \
    --cc=linux-mips@oss.sgi.com \
    --cc=lnz@dandelion.com \
    --cc=mat@lcs.mit.edu \
    --cc=ralf@mailhost.uni-koblenz.de \
    --cc=rfg@monkeys.com \
    --cc=sjhill@cotw.com \
    --cc=todd_m_roy@vermontel.net \
    /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.