Skip to contentSkip to conversation

Build failure: Error: attempt to move .org backwards

DISCUSSION Andreas Born 3 participants 6 messages Jan 18, 2012 – Jan 19, 2012

lore
Share & tools
lore
#0 lore raw

Hello,

having trouble building the latest bzr 3757. This happens with gcc 4.5.2 on Salix/Slackware 13.37 x86_64 system, but doesn't happen with gcc 4.6.2 on Arch Linux x86_64. I also checked recent other reports of such problems, but wasn't able to find a solution.

Here's some output:
gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -mrtd -mregparm=3 -fno-builtin -m32 -Wl,--build-id=none -nostdlib -Wl,-N,-S -Wl,-N -Wl,-Ttext,0x6000 -o lnxboot.image boot/i386/pc/lnxboot_image-lnxboot.o
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -DGRUB_TARGET_CPU_I386=1 -m32 -nostdinc -isystem /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include -DGRUB_FILE=\"boot/i386/pc/startup_raw.S\" -I. -I. -I.. -I.. -I../include -I../include -g -m32 -DASM_FILE=1 -MT boot/i386/pc/lzma_decompress_image-startup_raw.o -MD -MP -MF boot/i386/pc/.deps-core/lzma_decompress_image-startup_raw.Tpo -c -o boot/i386/pc/lzma_decompress_image-startup_raw.o test -f 'boot/i386/pc/startup_raw.S' || echo './'boot/i386/pc/startup_raw.S
reed_solomon.c: Assembler messages:
reed_solomon.c:651: Warning: ignoring changed section attributes for .text boot/i386/pc/startup_raw.S:119: Error: attempt to move .org backwards make[3]: *** [boot/i386/pc/lzma_decompress_image-startup_raw.o] Fehler 1 make[3]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build/grub-core' make[2]: *** [all] Fehler 2
make[2]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build/grub-core' make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build'
make: *** [all] Fehler 2

Regards,
Andreas Born

#1 lore raw

Hi,

Yes, I'm seeing that also. I guess version 4.5.2 of the compiler just isn't
as efficient as the most-recent GCC. I edited include/grub/offsets.h:

And changed:
#define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x7e0

To:
#define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x7f0

And that was enough. phcoder posted to this list not-too-long-ago with that
suggestion for another person as well. He said you can increase it as long as you don't do it too much and as long as the value is divisible by 8.

--S

Quoting Andreas Born, who wrote the following on Wed, 18 Jan 2012:

Quoted 38 lines

Hello,

having trouble building the latest bzr 3757. This happens with gcc 4.5.2 on Salix/Slackware 13.37 x86_64 system, but doesn't happen with gcc 4.6.2 on Arch Linux x86_64. I also checked recent other reports of such problems, but wasn't able to find a solution.

Here's some output:
gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef

(quoted diff) +0 -5
-Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 
-mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm 
-fno-asynchronous-unwind-tables -m32 -fno-stack-protector 
-mno-stack-arg-probe -Werror   -mrtd -mregparm=3       -fno-builtin   -m32 
-Wl,--build-id=none   -nostdlib -Wl,-N,-S -Wl,-N -Wl,-Ttext,0x6000   -o 

lnxboot.image boot/i386/pc/lnxboot_image-lnxboot.o
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include

(quoted diff) +0 -4
-DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -DGRUB_TARGET_CPU_I386=1 -m32 
-nostdinc -isystem /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include 
-DGRUB_FILE=\"boot/i386/pc/startup_raw.S\" -I. -I. -I.. -I.. -I../include 
-I../include     -g -m32 -DASM_FILE=1     -MT 

boot/i386/pc/lzma_decompress_image-startup_raw.o -MD -MP -MF boot/i386/pc/.deps-core/lzma_decompress_image-startup_raw.Tpo -c -o boot/i386/pc/lzma_decompress_image-startup_raw.o test -f 'boot/i386/pc/startup_raw.S' || echo './'boot/i386/pc/startup_raw.S reed_solomon.c: Assembler messages:
reed_solomon.c:651: Warning: ignoring changed section attributes for .text
boot/i386/pc/startup_raw.S:119: Error: attempt to move .org backwards
make[3]: *** [boot/i386/pc/lzma_decompress_image-startup_raw.o] Fehler 1
make[3]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build/grub-core'
make[2]: *** [all] Fehler 2
make[2]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build/grub-core'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build'
make: *** [all] Fehler 2

Regards,
Andreas Born

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#2 lore raw

Yes, that's exactly what I tried, but apparently it doesn't work. The lowest working value is 0x800 here. So gcc 4.5 seems to be worse than 4.4 and 4.6 better than both.

Andreas

Am 18.01.2012 23:53, schrieb Seth Goldberg:

Quoted 63 lines

Hi,

Yes, I'm seeing that also. I guess version 4.5.2 of the compiler
just isn't as efficient as the most-recent GCC. I edited include/grub/offsets.h:

And changed:
#define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x7e0

To:
#define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x7f0

And that was enough. phcoder posted to this list not-too-long-ago
with that suggestion for another person as well. He said you can increase it as long as you don't do it too much and as long as the value is divisible by 8.

--S

Quoting Andreas Born, who wrote the following on Wed, 18 Jan 2012:

Quoted 32 lines

Hello,

having trouble building the latest bzr 3757. This happens with gcc 4.5.2 on Salix/Slackware 13.37 x86_64 system, but doesn't happen with gcc 4.6.2 on Arch Linux x86_64. I also checked recent other reports of such problems, but wasn't able to find a solution.

Here's some output:
gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes

(quoted diff) +0 -6
-Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 
-falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow 
-fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -m32 
-fno-stack-protector -mno-stack-arg-probe -Werror   -mrtd 
-mregparm=3       -fno-builtin   -m32 -Wl,--build-id=none   -nostdlib 
-Wl,-N,-S -Wl,-N -Wl,-Ttext,0x6000   -o lnxboot.image 

boot/i386/pc/lnxboot_image-lnxboot.o
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include

(quoted diff) +0 -2
-DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC 
-DGRUB_TARGET_CPU_I386=1 -m32 -nostdinc -isystem 

/usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include

(quoted diff) +0 -2
-DGRUB_FILE=\"boot/i386/pc/startup_raw.S\" -I. -I. -I.. -I.. 
-I../include -I../include     -g -m32 -DASM_FILE=1     -MT 

boot/i386/pc/lzma_decompress_image-startup_raw.o -MD -MP -MF boot/i386/pc/.deps-core/lzma_decompress_image-startup_raw.Tpo -c -o boot/i386/pc/lzma_decompress_image-startup_raw.o test -f 'boot/i386/pc/startup_raw.S' || echo './'boot/i386/pc/startup_raw.S reed_solomon.c: Assembler messages:
reed_solomon.c:651: Warning: ignoring changed section attributes for .text
boot/i386/pc/startup_raw.S:119: Error: attempt to move .org backwards
make[3]: *** [boot/i386/pc/lzma_decompress_image-startup_raw.o] Fehler 1
make[3]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build/grub-core'
make[2]: *** [all] Fehler 2
make[2]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build/grub-core'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build'
make: *** [all] Fehler 2

Quoted 8 lines

Regards,
Andreas Born

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#3 lore raw

Hi,

I should also mention that I ifdef'ed out the reed-solomon add redundancy
stuff in grub-setup (since it was causing me problems I haven't had time to identify). You may want to try that also -- make sure you ifdef out the code that sets the redundancy size also, otherwise, you're going to crash.

--S

Quoting Andreas Born, who wrote the following on Thu, 19 Jan 2012:

Quoted 75 lines

Yes, that's exactly what I tried, but apparently it doesn't work. The lowest working value is 0x800 here. So gcc 4.5 seems to be worse than 4.4 and 4.6 better than both.

Andreas

Am 18.01.2012 23:53, schrieb Seth Goldberg:

Quoted 52 lines

Hi,

Yes, I'm seeing that also. I guess version 4.5.2 of the compiler just
isn't as efficient as the most-recent GCC. I edited include/grub/offsets.h:

And changed:
#define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x7e0

To:
#define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x7f0

And that was enough. phcoder posted to this list not-too-long-ago with
that suggestion for another person as well. He said you can increase it as long as you don't do it too much and as long as the value is divisible by 8.

--S

Quoting Andreas Born, who wrote the following on Wed, 18 Jan 2012:

Quoted 34 lines

Hello,

having trouble building the latest bzr 3757. This happens with gcc 4.5.2 on Salix/Slackware 13.37 x86_64 system, but doesn't happen with gcc 4.6.2 on Arch Linux x86_64. I also checked recent other reports of such problems, but wasn't able to find a solution.

Here's some output:
gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef

(quoted diff) +0 -5
-Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 
-mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm 
-fno-asynchronous-unwind-tables -m32 -fno-stack-protector 
-mno-stack-arg-probe -Werror   -mrtd -mregparm=3       -fno-builtin   -m32 
-Wl,--build-id=none   -nostdlib -Wl,-N,-S -Wl,-N -Wl,-Ttext,0x6000   -o 

lnxboot.image boot/i386/pc/lnxboot_image-lnxboot.o
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include

(quoted diff) +0 -2
-DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -DGRUB_TARGET_CPU_I386=1 
-m32 -nostdinc -isystem 

/usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include

(quoted diff) +0 -2
-DGRUB_FILE=\"boot/i386/pc/startup_raw.S\" -I. -I. -I.. -I.. -I../include 
-I../include     -g -m32 -DASM_FILE=1     -MT 

boot/i386/pc/lzma_decompress_image-startup_raw.o -MD -MP -MF boot/i386/pc/.deps-core/lzma_decompress_image-startup_raw.Tpo -c -o boot/i386/pc/lzma_decompress_image-startup_raw.o test -f 'boot/i386/pc/startup_raw.S' || echo './'boot/i386/pc/startup_raw.S reed_solomon.c: Assembler messages:
reed_solomon.c:651: Warning: ignoring changed section attributes for .text
boot/i386/pc/startup_raw.S:119: Error: attempt to move .org backwards
make[3]: *** [boot/i386/pc/lzma_decompress_image-startup_raw.o] Fehler 1
make[3]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build/grub-core'
make[2]: *** [all] Fehler 2
make[2]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build/grub-core'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build'
make: *** [all] Fehler 2

Regards,
Andreas Born

Quoted 10 lines
Quoted 5 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#4 lore raw

Yes, I'm going to try that. Just test booted an iso image with qemu and with 0x800 and that fails printing garbage to the screen. So probably that's too big.

Andreas

Am 19.01.2012 00:47, schrieb Seth Goldberg:

Quoted 90 lines

Hi,

I should also mention that I ifdef'ed out the reed-solomon add
redundancy stuff in grub-setup (since it was causing me problems I haven't had time to identify). You may want to try that also -- make sure you ifdef out the code that sets the redundancy size also, otherwise, you're going to crash.

--S

Quoting Andreas Born, who wrote the following on Thu, 19 Jan 2012:

Quoted 71 lines

Yes, that's exactly what I tried, but apparently it doesn't work. The lowest working value is 0x800 here. So gcc 4.5 seems to be worse than 4.4 and 4.6 better than both.

Andreas

Am 18.01.2012 23:53, schrieb Seth Goldberg:

Quoted 53 lines

Hi,

Yes, I'm seeing that also. I guess version 4.5.2 of the compiler
just isn't as efficient as the most-recent GCC. I edited include/grub/offsets.h:

And changed:
#define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x7e0

To:
#define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x7f0

And that was enough. phcoder posted to this list not-too-long-ago
with that suggestion for another person as well. He said you can increase it as long as you don't do it too much and as long as the value is divisible by 8.

--S

Quoting Andreas Born, who wrote the following on Wed, 18 Jan 2012:

Quoted 35 lines

Hello,

having trouble building the latest bzr 3757. This happens with gcc 4.5.2 on Salix/Slackware 13.37 x86_64 system, but doesn't happen with gcc 4.6.2 on Arch Linux x86_64. I also checked recent other reports of such problems, but wasn't able to find a solution.

Here's some output:
gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes

(quoted diff) +0 -6
-Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 
-falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow 
-fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -m32 
-fno-stack-protector -mno-stack-arg-probe -Werror   -mrtd 
-mregparm=3       -fno-builtin   -m32 -Wl,--build-id=none   
-nostdlib -Wl,-N,-S -Wl,-N -Wl,-Ttext,0x6000   -o lnxboot.image 

boot/i386/pc/lnxboot_image-lnxboot.o
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include

(quoted diff) +0 -2
-DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC 
-DGRUB_TARGET_CPU_I386=1 -m32 -nostdinc -isystem 

/usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include

(quoted diff) +0 -2
-DGRUB_FILE=\"boot/i386/pc/startup_raw.S\" -I. -I. -I.. -I.. 
-I../include -I../include     -g -m32 -DASM_FILE=1     -MT 

boot/i386/pc/lzma_decompress_image-startup_raw.o -MD -MP -MF boot/i386/pc/.deps-core/lzma_decompress_image-startup_raw.Tpo -c -o boot/i386/pc/lzma_decompress_image-startup_raw.o test -f 'boot/i386/pc/startup_raw.S' || echo './'boot/i386/pc/startup_raw.S reed_solomon.c: Assembler messages:
reed_solomon.c:651: Warning: ignoring changed section attributes for .text
boot/i386/pc/startup_raw.S:119: Error: attempt to move .org backwards
make[3]: *** [boot/i386/pc/lzma_decompress_image-startup_raw.o] Fehler 1
make[3]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build/grub-core'
make[2]: *** [all] Fehler 2
make[2]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build/grub-core'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build'
make: *** [all] Fehler 2

Regards,
Andreas Born

Quoted 10 lines
Quoted 5 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Quoted 5 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#5 lore raw
In reply to Andreas Born
Quoted 5 lines · Andreas Born

Hello,

having trouble building the latest bzr 3757. This happens with gcc 4.5.2 on Salix/Slackware 13.37 x86_64 system, but doesn't happen with gcc 4.6.2 on Arch Linux x86_64. I also checked recent other reports of such problems, but wasn't able to find a solution.

Can you try "small" (it's its name) branch?

Quoted 35 lines

Here's some output:
gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef

(quoted diff) +0 -6
-Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 
-falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow 
-fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -m32 
-fno-stack-protector -mno-stack-arg-probe -Werror   -mrtd 
-mregparm=3       -fno-builtin   -m32 -Wl,--build-id=none   -nostdlib 
-Wl,-N,-S -Wl,-N -Wl,-Ttext,0x6000   -o lnxboot.image 

boot/i386/pc/lnxboot_image-lnxboot.o
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include

(quoted diff) +0 -2
-DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC 
-DGRUB_TARGET_CPU_I386=1 -m32 -nostdinc -isystem 

/usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include

(quoted diff) +0 -2
-DGRUB_FILE=\"boot/i386/pc/startup_raw.S\" -I. -I. -I.. -I.. 
-I../include -I../include     -g -m32 -DASM_FILE=1     -MT 

boot/i386/pc/lzma_decompress_image-startup_raw.o -MD -MP -MF boot/i386/pc/.deps-core/lzma_decompress_image-startup_raw.Tpo -c -o boot/i386/pc/lzma_decompress_image-startup_raw.o test -f 'boot/i386/pc/startup_raw.S' || echo './'boot/i386/pc/startup_raw.S reed_solomon.c: Assembler messages:
reed_solomon.c:651: Warning: ignoring changed section attributes for .text
boot/i386/pc/startup_raw.S:119: Error: attempt to move .org backwards
make[3]: *** [boot/i386/pc/lzma_decompress_image-startup_raw.o] Fehler 1
make[3]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build/grub-core'
make[2]: *** [all] Fehler 2
make[2]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build/grub-core'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/shador/projects/checkouts/grub/branches/build'
make: *** [all] Fehler 2

Regards,
Andreas Born

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko