bug-grub
[Top][All Lists]
Advanced

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

[bug #32676] Linker error in 'grub-core/kern/i386/pc/startup.S' on a x86


From: Alexander Diewald
Subject: [bug #32676] Linker error in 'grub-core/kern/i386/pc/startup.S' on a x86_64 system
Date: Fri, 04 Mar 2011 12:41:26 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13

URL:
  <http://savannah.gnu.org/bugs/?32676>

                 Summary: Linker error in 'grub-core/kern/i386/pc/startup.S'
on a x86_64 system
                 Project: GNU GRUB
            Submitted by: diewi
            Submitted on: Fr 04 Mär 2011 12:41:25 GMT
                Category: Compilation
                Severity: Major
                Priority: 5 - Normal
              Item Group: Software Error
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 
                 Release: Bazaar - trunk
         Reproducibility: Every Time
         Planned Release: None

    _______________________________________________________

Details:

Hello,

I'm getting the following error when compiling GRUB2 either from the trunk
repository or the version "1.99_rc1":
kern/i386/pc/startup.S: Assembler messages:
kern/i386/pc/startup.S:161: Error: attempt to move .org backwards
kern/i386/pc/startup.S:456: Error: attempt to move .org backwards
kern/i386/pc/startup.S:458: Error: attempt to move .org backwards

The command causing this error is:
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -Wall -W -I../include
-I../include  -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -nostdinc
-isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include
-DGRUB_FILE=\"kern/i386/pc/startup.S\" -I. -I. -I.. -I.. -I../include
-I../include     -g -m32 -DASM_FILE=1     -MT
kern/i386/pc/kernel_exec-startup.o -MD -MP -MF
kern/i386/pc/.deps-core/kernel_exec-startup.Tpo -c -o
kern/i386/pc/kernel_exec-startup.o `test -f 'kern/i386/pc/startup.S' || echo
'./'`kern/i386/pc/startup.S

Here are the lines of code:
(157-161) #include <rs_decoder.S>

            .text

            . = _start + GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART

(448-459)  #ifdef ENABLE_LZMA
           #include "lzma_decode.S"
           #endif

           /*
            * The code beyond this point is compressed.  Assert that the
uncompressed
            * code fits GRUB_KERNEL_MACHINE_RAW_SIZE.
            */
            . = _start + GRUB_KERNEL_MACHINE_RAW_SIZE

            . = _start + GRUB_KERNEL_MACHINE_PREFIX
VARIABLE(grub_prefix)


According to the documentation of ld
(http://sourceware.org/binutils/docs-2.21/ld/Location-Counter.html#Location-Counter)
this error is thrown if the allocated space isn't enough for thoe code to fit
in. I could fix this error by adding 0x8 at the end of the lines, but then my
system didn't boot (obviously).

My system:
I'm running a Gentoo amd64 hardened system. I already switched my gcc and
binutils for the vanilla version (glibc was still hardened) but the error
remained the same. For testing I also reduced my CFLAGS to "-O2", but it
didn't help either. BTW, I disabled ccache for grub compilation.

I added the output of emerge --info to this report.

Regards, Alex



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fr 04 Mär 2011 12:41:25 GMT  Name: emerge-info.txt  Size: 5kB   By:
diewi

<http://savannah.gnu.org/bugs/download.php?file_id=22836>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32676>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]