Re: section mismatch

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

 





On Thu, 24 Apr 2008, Geert Uytterhoeven wrote:

On Wed, 23 Apr 2008, Finn Thain wrote:
Anyone know how to fix this warning?

  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x712c): Section mismatch in reference from the 
function mac_debug_console_write() to the variable 
.init.text:mac_serial_print
The function mac_debug_console_write() references the variable __init 
mac_serial_print.
This is often because mac_debug_console_write lacks a __init 
annotation or the annotation of mac_serial_print is wrong.

mac_serial_print is written in assembler (arch/m68k/kernel/head.S). Should
it be annotated in some way?

Can you move mac_serial_print and serial_putc just before the __INIT?

That would move it to section .text.head? I suppose the other sub arch's 
would suffer since they currently free up the space used by that serial 
output code which is presently in an init section.

Alternatively, as mac_serial_print is not used in head.S, perhaps you 
can just rewrite it in C (incl. manually inlining serial_putc) and put 
it in arch/m68k/mac/debug.c?

Reading through arch/m68k/mac/debug.c again, I can't see why we even need 
mac_debug_console_write() and mac_serial_print(). I've only ever used 
debug=ser|ser1|ser2 (rather than debug=scn|con) and it's always worked.

Moreover, I don't see any advantage in calling 
register_console(&mac_console_driver) with
  mac_console_driver.write = mac_debug_console_write
as opposed to,
  mac_console_driver.write = mac_sccb_console_write

Or am I missing something??

-f
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux