This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with binutils 2.11.92.0.12 and ..12.3
- From: Andrew Morton <akpm at zip dot com dot au>
- To: todd_m_roy at vermontel dot net
- Cc: bregor at anusf dot anu dot edu dot au, Kenneth Albanowski <kjahds at kjahds dot com>, Mat Hostetter <mat at lcs dot mit dot edu>, Andy Dougherty <doughera at lafcol dot lafayette dot edu>, Warner Losh <imp at village dot org>, linux-mips at oss dot sgi dot com, Ron Guilmette <rfg at monkeys dot com>, "Polstra; John" <linux-binutils-in at polstra dot com>, "Hazelwood; Galen" <galenh at micron dot net>, Ralf Baechle <ralf at mailhost dot uni-koblenz dot de>, Linas Vepstas <linas at linas dot org>, Feher Janos <aries at hal2000 dot terra dot vein dot hu>, Leonard Zubkoff <lnz at dandelion dot com>, "Steven J. Hill" <sjhill at cotw dot com>, linux-gcc at vger dot kernel dot org, GNU C Library <libc-alpha at sourceware dot cygnus dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 04 Dec 2001 23:17:27 -0800
- Subject: Re: Problem with binutils 2.11.92.0.12 and ..12.3
- References: <3C085FA1.CCDC7100@vermontel.net>, <3C085FA1.CCDC7100@vermontel.net>; from salteroy@vermontel.net on Fri, Nov 30, 2001 at 11:42:09PM -0500 <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.