Re: Problem with binutils 2.11.92.0.12 and ..12.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"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.

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux