[Fastboot] [PATCH] i386 kernel instant reboot with older binutils fix

Vivek Goyal vgoyal at in.ibm.com
Tue Jan 2 22:55:38 PST 2007


On Tue, Jan 02, 2007 at 11:44:34PM -0700, Eric W. Biederman wrote:
> Vivek Goyal <vgoyal at in.ibm.com> writes:
> 
> > o i386 kernel reboots instantly if compiled with binutils older than
> >   2.6.15.
> >
> > o Older binutils required explicit flags to mark a section allocatable
> >   and executable(AX). Newer binutils automatically mark a section AX if
> >   the name starts with .text.
> >
> > o While defining a new section using assembler "section" directive,
> >   explicitly mention section flags.
> 
> As such this patch looks fine, and is certainly harmless.  But don't we
> also need to address the issue that .text.head is not listed in the
> linker script?
> 
> i.e.  Don't we also need?
> 
>   .text : AT(ADDR(.text) - LOAD_OFFSET) {
>   	_text = .;			/* Text and read-only data */
> +	*(.text.head)
> 	*(.text)
> 	SCHED_TEXT
> 	LOCK_TEXT
> 	KPROBES_TEXT
> 	*(.fixup)
> 	*(.gnu.warning)
>   	_etext = .;			/* End of text section */
>   } :text = 0x9090
> 
> 
> I'm not even certain how the i386 kernel links properly without the above.

Hi Eric,

This .text.head section is not part of vmlinux. This is part of uncompressed
portion in bzImage. arch/i386/boot/compressed/head.S.

Hence, arch/i386/boot/compressed/vmlinux.lds should take care of it which
already has entry for linking .text.head section.

        . =  0  ;
        .text.head : {
                _head = . ;
                *(.text.head)
                _ehead = . ;
        }

Thanks
Vivek



More information about the fastboot mailing list