grub-0.97 with 64 bit gcc toolchain(gcc-4.2.1, binutils-2.18, glibc-2.6.1) $ grub-0.97> ./configure --prefix=/usr ... checking whether objcopy works for absolute addresses... no configure: error: GRUB requires a working absolute objcopy; upgrade your binutils ... $ echo $CC $ _ -------------------------------------------------------------------------- This bug is originally reported by Kurt Roeckx <kurt@roeckx.be> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=244498 "When grub's configure script runs it looks to the output of objcopy -O binary and complains that 2 files linked with an other address results in a different file. It seems that on amd64 this isn't working properly. When running configure it says: configure: error: GRUB requires a working absolute objcopy; upgrade your binutils in acinclude.m4: dnl Some versions of `objcopy -O binary' vary their output depending dnl on the link address. .... Running the test program mannually, once linked at 2000 once at 8000 shows this difference (hexdump of the binary file): 0000000 4855 e589 04c7 0025 0010 0200 0000 c900 0000010 00c3 0000 0000 0000 0014 0000 0000 0000 0000020 0001 7801 0c10 0807 0190 0000 0000 0000 -0000030 001c 0000 001c 0000 2000 0000 0000 0000 +0000030 001c 0000 001c 0000 8000 0000 0000 0000 0000040 0011 0000 0000 0000 0e41 8610 4302 060d 0000050 It shows the difference are the addresses linked at. Kurt"
I have no idea what grub is trying to do. Please extract a testcase from grub.
Please attach the two input files to objcopy. I doubt very much that this is an objcopy problem.
Hi, It takes time to file testcase or two input files. Because, i had delete reiser4 partition, trying to build new one(ext3). Sorry, see you later.
FWIW, the grub testcase is void cmain (void) { *((int *) 0x1000) = 2; } compiled then linked with -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr The above C code is compiled into the first 17 bytes of the dump. The differences look to be in .eh_frame. Not an objcopy bug. The grub test is bogus.
What is wrong with ".eh_frame"? then linker is not working? or binutils works fine? i am not sure, so tried following action. removed "{ (exit 1); exit 1; };" in below line. I have no name!-in-chroot:/temptools/src/tarballs/grub-0.97# vi +3937 configure and try to configure --prefix=/usr and make make[2]: Entering directory `/temptools/src/tarballs/grub-0.97/stage2' gcc -Os -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -m64 -pipe -g -c -o pre_stage2_exec-asm.o `test -f 'asm.S' || echo './'`asm.S if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -m64 -pipe -g -MT pre_stage2_exec-bios.o -MD -MP -MF ".deps/pre_stage2_exec-bios.Tpo" -c -o pre_stage2_exec-bios.o `test -f 'bios.c' || echo './'`bios.c; \ then mv -f ".deps/pre_stage2_exec-bios.Tpo" ".deps/pre_stage2_exec-bios.Po"; else rm -f ".deps/pre_stage2_exec-bios.Tpo"; exit 1; fi asm.S: Assembler messages: asm.S:1852: Error: suffix or operands invalid for `and' asm.S:1854: Error: suffix or operands invalid for `and' make[2]: *** [pre_stage2_exec-asm.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/temptools/src/tarballs/grub-0.97/stage2' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/temptools/src/tarballs/grub-0.97' make: *** [all] Error 2 I have no name!-in-chroot:/temptools/src/tarballs/grub-0.97# vi +1852 stage2/asm.S .code64 longmode: mov $0x2BADB002, %eax mov %rsi, %rbx and $0xffffffff, %rsi // asm.S:1852 and $0xffffffff, %rdi // asm.S:1854 call *%rdi /* NOTREACHED */ call EXT_C(stop) .code32 #endif /* ! STAGE1_5 */
Please provide a testcase. Objcopy works for me: bash-3.2$ cat x.c void cmain (void) { *((int *) 0x1000) = 2; } bash-3.2$ make cc -O2 -c -o x.o x.c ./ld -o x x.o -N -Ttext 0x100 ./ld: warning: cannot find entry symbol _start; defaulting to 0000000000000100 ./objcopy x y cmp x y bash-3.2$
(In reply to comment #5) > What is wrong with ".eh_frame"? then linker is not working? > or binutils works fine? i am not sure, so tried following action. > > call EXT_C(stop) ^^^^^^ This is invalid assembly code.
(In reply to comment #5) > What is wrong with ".eh_frame"? then linker is not working? > Objcopy works for me. Please provide a testcase if you think otherwise.
need to rebuild all gcc toolchain again, something is wrong.. make checkroot:/temptools/src/tarballs/binutils-build/binutils# make check Making check in doc make[1]: Entering directory `/temptools/src/tarballs/binutils-build/binutils/doc' make[1]: Nothing to be done for `check'. make[1]: Leaving directory `/temptools/src/tarballs/binutils-build/binutils/doc' Making check in po make[1]: Entering directory `/temptools/src/tarballs/binutils-build/binutils/po' make[1]: Nothing to be done for `check'. make[1]: Leaving directory `/temptools/src/tarballs/binutils-build/binutils/po' make[1]: Entering directory `/temptools/src/tarballs/binutils-build/binutils' make check-DEJAGNU make[2]: Entering directory `/temptools/src/tarballs/binutils-build/binutils' srcdir=`cd ../../binutils-2.18/binutils && pwd`; export srcdir; \ r=`pwd`; export r; \ EXPECT=expect; export EXPECT; \ runtest=runtest; \ if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \ CC_FOR_TARGET="` if [ -f $r/../gcc/xgcc ] ; then if [ -f $r/../newlib/Makefile ] ; then echo $r/../gcc/xgcc -B$r/../gcc/ -idirafter $r/../newlib/targ-include -idirafter ${srcroot}/../newlib/libc/include -nostdinc; else echo $r/../gcc/xgcc -B$r/../gcc/; fi; else if [ "x86_64-unknown-linux-gnu" = "x86_64-unknown-linux-gnu" ] ; then echo gcc; else echo gcc | sed 's,y,y,'; fi; fi`" CFLAGS_FOR_TARGET="-O2 -pipe" \ $runtest --tool binutils --srcdir ${srcdir}/testsuite \ ; \ else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi WARNING: Couldn't find the global config file. WARNING: Couldn't find tool init file Test Run By root on Tue Sep 25 09:10:41 2007 Native configuration is x86_64-unknown-linux-gnu === binutils tests === Schedule of variations: unix Running target unix Using /temptools/share/dejagnu/baseboards/unix.exp as board description file for target. Using /temptools/share/dejagnu/config/unix.exp as generic interface file for target. Using /temptools/src/tarballs/binutils-2.18/binutils/testsuite/config/default.exp as tool-and-target-specific interface file. Running /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/ar.exp ... FAIL: ar long file names ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/bintest.s: assembly failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/bintest.s: assembly failed Running /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/arm/objdump.exp ... Running /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/dlltool.exp ... Running /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/hppa/objdump.exp ... Running /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/m68k/objdump.exp ... Running /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/nm.exp ... Version /temptools/src/tarballs/binutils-build/binutils/nm-new failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/bintest.s: assembly failed Running /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/objcopy.exp ... Version /temptools/src/tarballs/binutils-build/binutils/objcopy failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/bintest.s: assembly failed ERROR: unresolved simple copy FAIL: objcopy --reverse-bytes FAIL: objcopy -O srec ERROR: objdump can not recognize bintest.o ERROR: objdump can not recognize bintest.o ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/unknown.s: assembly failed ERROR: unresolved ELF unknown section type ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/group.s: assembly failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/copy-1.s: assembly failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/copytest.s: assembly failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/bintest.s: assembly failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/group.s: assembly failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/group.s: assembly failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/empty.s: assembly failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/needed-by-reloc.s: assembly failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/localize-hidden-1.s: assembly failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/localize-hidden-2.s: assembly failed Running /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/objdump.exp ... Version /temptools/src/tarballs/binutils-build/binutils/objdump failed FAIL: objdump -i ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/bintest.s: assembly failed Running /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/readelf.exp ... Version /temptools/src/tarballs/binutils-build/binutils/readelf failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/bintest.s: assembly failed ERROR: unresolved 1 Running /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/size.exp ... Version /temptools/src/tarballs/binutils-build/binutils/size failed ERROR: /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/bintest.s: assembly failed Running /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/vax/objdump.exp ... Running /temptools/src/tarballs/binutils-2.18/binutils/testsuite/binutils-all/windres/windres.exp ... === binutils Summary === # of unexpected failures 4 # of unresolved testcases 16 # of untested testcases 5 make[2]: *** [check-DEJAGNU] Error 1 make[2]: Leaving directory `/temptools/src/tarballs/binutils-build/binutils' make[1]: *** [check-am] Error 2 make[1]: Leaving directory `/temptools/src/tarballs/binutils-build/binutils' make: *** [check-recursive] Error 1 root-in-chroot:/temptools/src/tarballs/binutils-build/binutils#
(In reply to comment #9) > need to rebuild all gcc toolchain again, something is wrong.. > Your system is corrupted. Binutils 2.18 should have no problems on Linux/x86-64.
I rebuild whole system with lfs, binutils testcase seems fine. But i want to know the reason why grub-0.97 has been failed. Still got " asm.S:1852: Error: suffix or operands invalid for `and' asm.S:1854: Error: suffix or operands invalid for `and' " It is known to failed to compile grub-0.97 but the specific reason i wish to know. root:/sources/binutils-build# make check make[1]: Entering directory `/sources/binutils-build' make[2]: Entering directory `/sources/binutils-build/bfd' Making check in po make[3]: Entering directory `/sources/binutils-build/bfd/po' make[3]: Nothing to be done for `check'. make[3]: Leaving directory `/sources/binutils-build/bfd/po' make[3]: Entering directory `/sources/binutils-build/bfd' make[3]: Nothing to be done for `check-am'. make[3]: Leaving directory `/sources/binutils-build/bfd' make[2]: Leaving directory `/sources/binutils-build/bfd' make[2]: Entering directory `/sources/binutils-build/opcodes' Making check in po make[3]: Entering directory `/sources/binutils-build/opcodes/po' make[3]: Nothing to be done for `check'. make[3]: Leaving directory `/sources/binutils-build/opcodes/po' make[3]: Entering directory `/sources/binutils-build/opcodes' make[3]: Nothing to be done for `check-am'. make[3]: Leaving directory `/sources/binutils-build/opcodes' make[2]: Leaving directory `/sources/binutils-build/opcodes' make[2]: Entering directory `/sources/binutils-build/binutils' Making check in doc make[3]: Entering directory `/sources/binutils-build/binutils/doc' make[3]: Nothing to be done for `check'. make[3]: Leaving directory `/sources/binutils-build/binutils/doc' Making check in po make[3]: Entering directory `/sources/binutils-build/binutils/po' make[3]: Nothing to be done for `check'. make[3]: Leaving directory `/sources/binutils-build/binutils/po' make[3]: Entering directory `/sources/binutils-build/binutils' make check-DEJAGNU make[4]: Entering directory `/sources/binutils-build/binutils' srcdir=`cd ../../binutils-2.18/binutils && pwd`; export srcdir; \ r=`pwd`; export r; \ EXPECT=expect; export EXPECT; \ runtest=runtest; \ if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \ CC_FOR_TARGET="gcc -L/sources/binutils-build/./ld" CFLAGS_FOR_TARGET="-g -O2" \ $runtest --tool binutils --srcdir ${srcdir}/testsuite \ ; \ else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi WARNING: Couldn't find the global config file. WARNING: Couldn't find tool init file Test Run By root on Sun Sep 30 02:46:16 2007 Native configuration is x86_64-unknown-linux-gnu === binutils tests === Schedule of variations: unix Running target unix Using /tools/share/dejagnu/baseboards/unix.exp as board description file for target. Using /tools/share/dejagnu/config/unix.exp as generic interface file for target. Using /sources/binutils-2.18/binutils/testsuite/config/default.exp as tool-and-target-specific interface file. Running /sources/binutils-2.18/binutils/testsuite/binutils-all/ar.exp ... Running /sources/binutils-2.18/binutils/testsuite/binutils-all/arm/objdump.exp ... Running /sources/binutils-2.18/binutils/testsuite/binutils-all/dlltool.exp ... Running /sources/binutils-2.18/binutils/testsuite/binutils-all/hppa/objdump.exp ... Running /sources/binutils-2.18/binutils/testsuite/binutils-all/m68k/objdump.exp ... Running /sources/binutils-2.18/binutils/testsuite/binutils-all/nm.exp ... Version /sources/binutils-build/binutils/nm-new 2.18 Running /sources/binutils-2.18/binutils/testsuite/binutils-all/objcopy.exp ... Version /sources/binutils-build/binutils/objcopy 2.18 Running /sources/binutils-2.18/binutils/testsuite/binutils-all/objdump.exp ... Version /sources/binutils-build/binutils/objdump 2.18 Running /sources/binutils-2.18/binutils/testsuite/binutils-all/readelf.exp ... Version /sources/binutils-build/binutils/readelf 2.18 Running /sources/binutils-2.18/binutils/testsuite/binutils-all/size.exp ... Version /sources/binutils-build/binutils/size 2.18 Running /sources/binutils-2.18/binutils/testsuite/binutils-all/vax/objdump.exp ... Running /sources/binutils-2.18/binutils/testsuite/binutils-all/windres/windres.exp ... === binutils Summary === # of expected passes 45 make[4]: Leaving directory `/sources/binutils-build/binutils' make[3]: Leaving directory `/sources/binutils-build/binutils' make[2]: Leaving directory `/sources/binutils-build/binutils' make[2]: Entering directory `/sources/binutils-build/etc' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/sources/binutils-build/etc' make[2]: Entering directory `/sources/binutils-build/gas' Making check in doc make[3]: Entering directory `/sources/binutils-build/gas/doc' make[3]: Nothing to be done for `check'. make[3]: Leaving directory `/sources/binutils-build/gas/doc' Making check in po make[3]: Entering directory `/sources/binutils-build/gas/po' make[3]: Nothing to be done for `check'. make[3]: Leaving directory `/sources/binutils-build/gas/po' make[3]: Entering directory `/sources/binutils-build/gas' make check-DEJAGNU make[4]: Entering directory `/sources/binutils-build/gas' if [ -d testsuite ]; then \ true; \ else \ mkdir testsuite; \ fi rm -f testsuite/site.exp cp site.exp testsuite/site.exp rootme=`pwd`; export rootme; \ srcdir=`cd ../../binutils-2.18/gas; pwd` ; export srcdir ; \ EXPECT=expect ; export EXPECT ; \ runtest=runtest; \ cd testsuite; \ if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \ $runtest --tool gas --srcdir ${srcdir}/testsuite \ ; \ else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi WARNING: Couldn't find the global config file. WARNING: Couldn't find tool init file Test Run By root on Sun Sep 30 02:46:23 2007 Native configuration is x86_64-unknown-linux-gnu === gas tests === Schedule of variations: unix Running target unix Using /tools/share/dejagnu/baseboards/unix.exp as board description file for target. Using /tools/share/dejagnu/config/unix.exp as generic interface file for target. Using /sources/binutils-2.18/gas/testsuite/config/default.exp as tool-and-target-specific interface file. Running /sources/binutils-2.18/gas/testsuite/gas/all/gas.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/alpha/alpha.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/arc/arc.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/arc/warn.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/arm/arm.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/bfin/bfin.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/cfi/cfi.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/cr16/cr16.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/cris/cris.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/crx/allinsn.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/d10v/d10v.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/d30v/d30.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/dlx/alltests.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/elf/elf.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/fr30/allinsn.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/fr30/fr30.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/frv/allinsn.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/h8300-coff.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/h8300-elf.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/h8300.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t01_mov.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t02_mova.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t03_add.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t04_sub.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t05_cmp.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t06_ari2.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t07_ari3.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t08_or.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t09_xor.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t10_and.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t11_logs.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t12_bit.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/h8300/t13_otr.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/hppa/basic/basic.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/hppa/parse/parse.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/hppa/reloc/reloc.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/hppa/unsorted/unsorted.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/i386/i386.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/i860/i860.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/ia64/ia64.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/ieee-fp/x930509a.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/iq2000/allinsn.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/iq2000/load-hazards.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/iq2000/odd-ldw.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/iq2000/odd-sdw.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/iq2000/yield.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/lns/lns.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/m32r/allinsn.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/m32r/error.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/m32r/m32r.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/m32r/m32r2.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/m32r/m32rx.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/m32r/pic.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/m32r/rel32.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/m68hc11/m68hc11.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/m68k-coff/gas.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/m68k/all.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/macros/macros.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/maxq10/maxq10.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/maxq20/maxq20.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mcore/allinsn.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mep/allinsn.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mep/complex-relocs.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mips/mips.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mmix/mmix-err.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mmix/mmix-list.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mmix/mmix.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mn10200/basic.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mn10300/basic.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mri/mri.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/msp430/msp430.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mt/errors.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mt/mt.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/mt/relocs.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/openrisc/allinsn.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/pdp11/pdp11.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/pj/pj.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/ppc/aix.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/ppc/ppc.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/s390/s390.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/score/relax.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/sh/arch/arch.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/sh/basic.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/sh/err.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/sh/sh64/err.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/sh/sh64/sh64.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/sparc-solaris/addend.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/sparc-solaris/gas.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/sparc/mismatch.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/sparc/sparc.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/sun4/addend.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/symver/symver.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/tic4x/tic4x.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/tic54x/tic54x.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/v850/basic.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/vax/vax.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/xc16x/xc16x.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/xstormy16/allinsn.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/xtensa/all.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/z80/z80.exp ... Running /sources/binutils-2.18/gas/testsuite/gas/z8k/z8k.exp ... === gas Summary === # of expected passes 241 ../as-new 2.18 make[4]: Leaving directory `/sources/binutils-build/gas' make[3]: Leaving directory `/sources/binutils-build/gas' make[2]: Leaving directory `/sources/binutils-build/gas' make[2]: Entering directory `/sources/binutils-build/gprof' make check-recursive make[3]: Entering directory `/sources/binutils-build/gprof' Making check in po make[4]: Entering directory `/sources/binutils-build/gprof/po' make[4]: Nothing to be done for `check'. make[4]: Leaving directory `/sources/binutils-build/gprof/po' make[4]: Entering directory `/sources/binutils-build/gprof' make[4]: Nothing to be done for `check-am'. make[4]: Leaving directory `/sources/binutils-build/gprof' make[3]: Leaving directory `/sources/binutils-build/gprof' make[2]: Leaving directory `/sources/binutils-build/gprof' make[2]: Entering directory `/sources/binutils-build/intl' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/sources/binutils-build/intl' make[2]: Entering directory `/sources/binutils-build/ld' Making check in po make[3]: Entering directory `/sources/binutils-build/ld/po' make[3]: Nothing to be done for `check'. make[3]: Leaving directory `/sources/binutils-build/ld/po' make[3]: Entering directory `/sources/binutils-build/ld' make check-DEJAGNU make[4]: Entering directory `/sources/binutils-build/ld' srcroot=`cd ../../binutils-2.18/ld && pwd`; export srcroot; \ r=`pwd`; export r; \ LC_COLLATE=; LC_ALL=; LANG=; export LC_COLLATE LC_ALL LANG; \ EXPECT=expect; export EXPECT; \ runtest=runtest; \ if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \ $runtest --tool ld --srcdir ${srcroot}/testsuite \ CC="gcc -L/sources/binutils-build/./ld" CFLAGS="-g -O2" \ CXX="g++ -L/sources/binutils-build/./ld" CXXFLAGS="-g -O2" \ CC_FOR_HOST="gcc" CFLAGS_FOR_HOST="-g -O2" \ OFILES="ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o sha1.o eelf_x86_64.o eelf_i386.o ei386linux.o " BFDLIB="../bfd/.libs/libbfd.a" \ LIBIBERTY="../libiberty/libiberty.a " LIBS="" \ ; \ else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi WARNING: Couldn't find the global config file. WARNING: Couldn't find tool init file Test Run By root on Sun Sep 30 02:46:54 2007 Native configuration is x86_64-unknown-linux-gnu === ld tests === Schedule of variations: unix Running target unix Using /tools/share/dejagnu/baseboards/unix.exp as board description file for target. Using /tools/share/dejagnu/config/unix.exp as generic interface file for target. Using /sources/binutils-2.18/ld/testsuite/config/default.exp as tool-and-target-specific interface file. Running /sources/binutils-2.18/ld/testsuite/ld-alpha/alpha.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-arm/arm-elf.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-auto-import/auto-import.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-bootstrap/bootstrap.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-cdtest/cdtest.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-checks/checks.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-cris/cris.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-crx/crx.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-cygwin/exe-export.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-d10v/d10v.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-discard/discard.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elf/binutils.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elf/dwarf.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elf/elf.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elf/exclude.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elf/frame.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elf/sec64k.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elf/shared.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elf/tls_common.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elf/wrap.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elfcomm/elfcomm.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elfvers/vers.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elfvsb/elfvsb.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-elfweak/elfweak.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-fastcall/fastcall.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-frv/fdpic.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-frv/frv-elf.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-frv/tls.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-h8300/h8300.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-i386/i386.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-ia64/ia64.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-libs/libs.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-linkonce/linkonce.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-m68hc11/m68hc11.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-m68k/m68k.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-maxq/maxq.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-mep/mep.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-mips-elf/mips-elf-flags.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-mips-elf/mips-elf.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-mmix/mmix.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-pe/direct.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-pe/pe.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-pie/pie.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-powerpc/powerpc.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-s390/s390.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/align.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/alignof.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/assert.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/crossref.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/data.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/default-script.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/defined.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/dynamic-sections.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/empty-address.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/empty-aligned.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/empty-orphan.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/expr.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/extern.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/map-address.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/overlay-size.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/phdrs.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/phdrs2.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/provide.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/script.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/size.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/sizeof.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/sort.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-scripts/weak.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-selective/sel-dump.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-selective/selective.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-sh/arch/arch.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-sh/rd-sh.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-sh/sh-vxworks.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-sh/sh.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-sh/sh64/rd-sh64.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-sh/sh64/relax.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-sh/sh64/relfail.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-sh/sh64/sh64.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-shared/shared.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-sparc/sparc.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-spu/spu.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-srec/srec.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-undefined/undefined.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-undefined/weak-undef.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-v850/v850.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-versados/versados.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-vxworks/vxworks.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-x86-64/x86-64.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-xc16x/xc16x.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-xstormy16/xstormy16.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-xtensa/coalesce.exp ... Running /sources/binutils-2.18/ld/testsuite/ld-xtensa/lcall.exp ... === ld Summary === # of expected passes 372 # of expected failures 57 /sources/binutils-build/ld/ld-new 2.18
(In reply to comment #11) > I rebuild whole system with lfs, binutils testcase seems fine. > But i want to know the reason why grub-0.97 has been failed. > Still got > " > asm.S:1852: Error: suffix or operands invalid for `and' > asm.S:1854: Error: suffix or operands invalid for `and' > " > It looks like that assembly sources in grub-0.97 are 32bit, not 64bit.
Thanks, so i tried following action. root:/sources/grub-0.97# vi +1852 stage2/asm.S - and $0xffffffff, %rsi + and $0xffffffffffffffff, %rsi - and $0xffffffff, %rdi + and $0xffffffffffffffff, %rdi and here is the result, root:/sources/grub-0.97# make make all-recursive make[1]: Entering directory `/sources/grub-0.97' Making all in netboot make[2]: Entering directory `/sources/grub-0.97/netboot' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/sources/grub-0.97/netboot' Making all in stage2 make[2]: Entering directory `/sources/grub-0.97/stage2' gcc -Os -fno-strict-aliasing -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -m64 -g -c -o pre_stage2_exec-asm.o `test -f 'asm.S' || echo './'`asm.S if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-strict-aliasing -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -m64 -g -MT pre_stage2_exec-bios.o -MD -MP -MF ".deps/pre_stage2_exec-bios.Tpo" -c -o pre_stage2_exec-bios.o `test -f 'bios.c' || echo './'`bios.c; \ then mv -f ".deps/pre_stage2_exec-bios.Tpo" ".deps/pre_stage2_exec-bios.Po"; else rm -f ".deps/pre_stage2_exec-bios.Tpo"; exit 1; fi if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-strict-aliasing -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -m64 -g -MT pre_stage2_exec-boot.o -MD -MP -MF ".deps/pre_stage2_exec-boot.Tpo" -c -o pre_stage2_exec-boot.o `test -f 'boot.c' || echo './'`boot.c; \ then mv -f ".deps/pre_stage2_exec-boot.Tpo" ".deps/pre_stage2_exec-boot.Po"; else rm -f ".deps/pre_stage2_exec-boot.Tpo"; exit 1; fi boot.c: In function ‘load_image’: boot.c:80: warning: cast from pointer to integer of different size boot.c:80: warning: cast from pointer to integer of different size boot.c:80: warning: cast to pointer from integer of different size boot.c:80: warning: cast from pointer to integer of different size boot.c:80: warning: cast to pointer from integer of different size boot.c:80: warning: cast from pointer to integer of different size boot.c:80: warning: cast to pointer from integer of different size boot.c:80: warning: cast from pointer to integer of different size boot.c:80: warning: cast to pointer from integer of different size boot.c:80: warning: cast from pointer to integer of different size boot.c:80: warning: cast to pointer from integer of different size boot.c:80: warning: cast from pointer to integer of different size boot.c:80: warning: cast to pointer from integer of different size boot.c:112: warning: cast to pointer from integer of different size boot.c:114: warning: cast to pointer from integer of different size boot.c:146: warning: cast to pointer from integer of different size boot.c:194: warning: cast from pointer to integer of different size boot.c:194: warning: cast to pointer from integer of different size boot.c:199: warning: cast from pointer to integer of different size boot.c:205: warning: cast from pointer to integer of different size boot.c:451: warning: cast from pointer to integer of different size boot.c:485: warning: cast from pointer to integer of different size boot.c:507: warning: cast to pointer from integer of different size boot.c:521: warning: cast to pointer from integer of different size boot.c:530: warning: cast to pointer from integer of different size boot.c:550: warning: cast to pointer from integer of different size boot.c:555: warning: cast to pointer from integer of different size boot.c:563: warning: cast to pointer from integer of different size boot.c:572: warning: cast to pointer from integer of different size boot.c:606: warning: cast from pointer to integer of different size boot.c:607: warning: cast to pointer from integer of different size boot.c:626: warning: cast from pointer to integer of different size boot.c:627: warning: cast from pointer to integer of different size boot.c:629: warning: cast from pointer to integer of different size boot.c:629: warning: cast to pointer from integer of different size boot.c:644: warning: cast to pointer from integer of different size boot.c:647: warning: cast to pointer from integer of different size boot.c:676: warning: cast to pointer from integer of different size boot.c:705: warning: cast to pointer from integer of different size boot.c:740: warning: cast from pointer to integer of different size boot.c: In function ‘load_module’: boot.c:776: warning: cast to pointer from integer of different size boot.c:787: warning: cast from pointer to integer of different size boot.c:789: warning: cast from pointer to integer of different size boot.c: In function ‘load_initrd’: boot.c:809: warning: cast to pointer from integer of different size boot.c:818: warning: cast to pointer from integer of different size boot.c:845: warning: cast to pointer from integer of different size boot.c: In function ‘bsd_boot’: boot.c:992: warning: cast from pointer to integer of different size if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-strict-aliasing -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -m64 -g -MT pre_stage2_exec-builtins.o -MD -MP -MF ".deps/pre_stage2_exec-builtins.Tpo" -c -o pre_stage2_exec-builtins.o `test -f 'builtins.c' || echo './'`builtins.c; \ then mv -f ".deps/pre_stage2_exec-builtins.Tpo" ".deps/pre_stage2_exec-builtins.Po"; else rm -f ".deps/pre_stage2_exec-builtins.Tpo"; exit 1; fi builtins.c: In function ‘boot_func’: builtins.c:303: warning: cast from pointer to integer of different size builtins.c:303: warning: cast from pointer to integer of different size builtins.c:305: warning: cast from pointer to integer of different size builtins.c:305: warning: cast from pointer to integer of different size builtins.c: In function ‘multi_boot_64bit’: builtins.c:324: warning: declaration of ‘entry_addr’ shadows a global declaration ./shared.h:700: warning: shadowed declaration is here builtins.c:324: warning: declaration of ‘mbi’ shadows a global declaration ./shared.h:680: warning: shadowed declaration is here builtins.c:326: warning: initialization makes pointer from integer without a cast builtins.c:327: warning: initialization makes pointer from integer without a cast builtins.c:328: warning: initialization makes pointer from integer without a cast builtins.c:329: warning: initialization makes pointer from integer without a cast builtins.c:330: warning: initialization makes pointer from integer without a cast builtins.c:331: warning: initialization makes pointer from integer without a cast builtins.c: In function ‘displaymem_func’: builtins.c:990: warning: cast from pointer to integer of different size builtins.c:1006: warning: cast from pointer to integer of different size builtins.c: In function ‘embed_func’: builtins.c:1142: warning: cast from pointer to integer of different size builtins.c:1142: warning: cast to pointer from integer of different size builtins.c:1150: warning: cast from pointer to integer of different size builtins.c:1150: warning: cast to pointer from integer of different size builtins.c:1150: warning: cast from pointer to integer of different size builtins.c:1150: warning: cast to pointer from integer of different size builtins.c: In function ‘disk_read_blocklist_func’: builtins.c:1886: warning: cast to pointer from integer of different size builtins.c:1887: warning: cast to pointer from integer of different size builtins.c:1888: warning: cast from pointer to integer of different size builtins.c:1892: warning: cast to pointer from integer of different size builtins.c:1896: warning: cast to pointer from integer of different size builtins.c:1897: warning: cast to pointer from integer of different size builtins.c:1901: warning: cast to pointer from integer of different size builtins.c: In function ‘install_func’: builtins.c:2078: warning: cast from pointer to integer of different size builtins.c:2079: warning: cast to pointer from integer of different size builtins.c:2082: warning: cast from pointer to integer of different size builtins.c:2082: warning: cast to pointer from integer of different size builtins.c:2083: warning: cast to pointer from integer of different size builtins.c:2084: warning: cast to pointer from integer of different size builtins.c:2090: warning: cast to pointer from integer of different size builtins.c:2091: warning: cast to pointer from integer of different size builtins.c:2095: warning: cast from pointer to integer of different size builtins.c: In function ‘partnew_func’: builtins.c:2850: warning: cast from pointer to integer of different size builtins.c:2850: warning: cast to pointer from integer of different size builtins.c:2851: warning: cast from pointer to integer of different size builtins.c:2851: warning: cast to pointer from integer of different size builtins.c:2852: warning: cast from pointer to integer of different size builtins.c:2852: warning: cast to pointer from integer of different size builtins.c:2853: warning: cast from pointer to integer of different size builtins.c:2853: warning: cast to pointer from integer of different size builtins.c:2854: warning: cast from pointer to integer of different size builtins.c:2854: warning: cast to pointer from integer of different size builtins.c:2855: warning: cast from pointer to integer of different size builtins.c:2855: warning: cast to pointer from integer of different size builtins.c:2856: warning: cast from pointer to integer of different size builtins.c:2856: warning: cast to pointer from integer of different size builtins.c:2857: warning: cast from pointer to integer of different size builtins.c:2857: warning: cast to pointer from integer of different size builtins.c:2858: warning: cast from pointer to integer of different size builtins.c:2858: warning: cast to pointer from integer of different size builtins.c:2859: warning: cast from pointer to integer of different size builtins.c:2859: warning: cast to pointer from integer of different size builtins.c:2862: warning: cast from pointer to integer of different size builtins.c:2862: warning: cast to pointer from integer of different size builtins.c: In function ‘parttype_func’: builtins.c:2934: warning: cast from pointer to integer of different size builtins.c:2934: warning: cast to pointer from integer of different size builtins.c: In function ‘read_func’: builtins.c:3117: warning: cast to pointer from integer of different size builtins.c: In function ‘testload_func’: builtins.c:4472: warning: cast to pointer from integer of different size builtins.c:4473: warning: cast to pointer from integer of different size builtins.c:4511: warning: cast to pointer from integer of different size builtins.c:4512: warning: cast to pointer from integer of different size if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-strict-aliasing -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -m64 -g -MT pre_stage2_exec-char_io.o -MD -MP -MF ".deps/pre_stage2_exec-char_io.Tpo" -c -o pre_stage2_exec-char_io.o `test -f 'char_io.c' || echo './'`char_io.c; \ then mv -f ".deps/pre_stage2_exec-char_io.Tpo" ".deps/pre_stage2_exec-char_io.Po"; else rm -f ".deps/pre_stage2_exec-char_io.Tpo"; exit 1; fi char_io.c: In function ‘grub_printf’: char_io.c:183: warning: cast to pointer from integer of different size char_io.c: In function ‘grub_sprintf’: char_io.c:223: warning: cast to pointer from integer of different size char_io.c: In function ‘grub_memmove’: char_io.c:1223: warning: cast from pointer to integer of different size char_io.c: In function ‘grub_memset’: char_io.c:1261: warning: cast from pointer to integer of different size if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-strict-aliasing -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -m64 -g -MT pre_stage2_exec-cmdline.o -MD -MP -MF ".deps/pre_stage2_exec-cmdline.Tpo" -c -o pre_stage2_exec-cmdline.o `test -f 'cmdline.c' || echo './'`cmdline.c; \ then mv -f ".deps/pre_stage2_exec-cmdline.Tpo" ".deps/pre_stage2_exec-cmdline.Po"; else rm -f ".deps/pre_stage2_exec-cmdline.Tpo"; exit 1; fi cmdline.c: In function ‘run_script’: cmdline.c:218: warning: cast from pointer to integer of different size cmdline.c:218: warning: cast from pointer to integer of different size if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-strict-aliasing -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -m64 -g -MT pre_stage2_exec-common.o -MD -MP -MF ".deps/pre_stage2_exec-common.Tpo" -c -o pre_stage2_exec-common.o `test -f 'common.c' || echo './'`common.c; \ then mv -f ".deps/pre_stage2_exec-common.Tpo" ".deps/pre_stage2_exec-common.Po"; else rm -f ".deps/pre_stage2_exec-common.Tpo"; exit 1; fi if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-strict-aliasing -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -m64 -g -MT pre_stage2_exec-console.o -MD -MP -MF ".deps/pre_stage2_exec-console.Tpo" -c -o pre_stage2_exec-console.o `test -f 'console.c' || echo './'`console.c; \ then mv -f ".deps/pre_stage2_exec-console.Tpo" ".deps/pre_stage2_exec-console.Po"; else rm -f ".deps/pre_stage2_exec-console.Tpo"; exit 1; fi if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-strict-aliasing -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -m64 -g -MT pre_stage2_exec-disk_io.o -MD -MP -MF ".deps/pre_stage2_exec-disk_io.Tpo" -c -o pre_stage2_exec-disk_io.o `test -f 'disk_io.c' || echo './'`disk_io.c; \ then mv -f ".deps/pre_stage2_exec-disk_io.Tpo" ".deps/pre_stage2_exec-disk_io.Po"; else rm -f ".deps/pre_stage2_exec-disk_io.Tpo"; exit 1; fi disk_io.c: In function ‘make_saved_active’: disk_io.c:473: warning: cast from pointer to integer of different size disk_io.c:473: warning: cast to pointer from integer of different size disk_io.c:473: warning: cast from pointer to integer of different size disk_io.c:473: warning: cast to pointer from integer of different size disk_io.c:473: warning: cast from pointer to integer of different size disk_io.c:473: warning: cast to pointer from integer of different size disk_io.c:480: warning: cast from pointer to integer of different size disk_io.c:480: warning: cast to pointer from integer of different size disk_io.c:486: warning: cast from pointer to integer of different size disk_io.c:486: warning: cast to pointer from integer of different size disk_io.c:489: warning: cast from pointer to integer of different size disk_io.c:489: warning: cast to pointer from integer of different size disk_io.c: In function ‘set_partition_hidden_flag’: disk_io.c:540: warning: cast from pointer to integer of different size disk_io.c:540: warning: cast to pointer from integer of different size disk_io.c:542: warning: cast from pointer to integer of different size disk_io.c:542: warning: cast to pointer from integer of different size disk_io.c: In function ‘next_bsd_partition’: disk_io.c:615: warning: cast from pointer to integer of different size disk_io.c:615: warning: cast to pointer from integer of different size disk_io.c:625: warning: cast from pointer to integer of different size disk_io.c:625: warning: cast to pointer from integer of different size disk_io.c:627: warning: cast from pointer to integer of different size disk_io.c:627: warning: cast to pointer from integer of different size disk_io.c:631: warning: cast from pointer to integer of different size disk_io.c:631: warning: cast to pointer from integer of different size disk_io.c:632: warning: cast from pointer to integer of different size disk_io.c:632: warning: cast to pointer from integer of different size disk_io.c:633: warning: cast from pointer to integer of different size disk_io.c:633: warning: cast to pointer from integer of different size disk_io.c:638: warning: cast from pointer to integer of different size disk_io.c:638: warning: cast to pointer from integer of different size disk_io.c: In function ‘next_pc_slice’: disk_io.c:670: warning: cast from pointer to integer of different size disk_io.c:670: warning: cast to pointer from integer of different size disk_io.c:687: warning: cast from pointer to integer of different size disk_io.c:687: warning: cast to pointer from integer of different size disk_io.c:687: warning: cast from pointer to integer of different size disk_io.c:687: warning: cast to pointer from integer of different size disk_io.c:687: warning: cast from pointer to integer of different size disk_io.c:687: warning: cast to pointer from integer of different size disk_io.c:691: warning: cast from pointer to integer of different size disk_io.c:691: warning: cast to pointer from integer of different size disk_io.c:703: warning: cast from pointer to integer of different size disk_io.c:703: warning: cast to pointer from integer of different size disk_io.c:704: warning: cast from pointer to integer of different size disk_io.c:704: warning: cast to pointer from integer of different size disk_io.c:705: warning: cast from pointer to integer of different size disk_io.c:705: warning: cast to pointer from integer of different size disk_io.c: In function ‘set_bootdev’: disk_io.c:1155: warning: cast to pointer from integer of different size disk_io.c: In function ‘grub_open’: disk_io.c:1593: warning: cast to pointer from integer of different size disk_io.c:1604: warning: cast to pointer from integer of different size disk_io.c: In function ‘grub_read’: disk_io.c:1703: warning: cast to pointer from integer of different size disk_io.c:1714: warning: cast to pointer from integer of different size disk_io.c:1722: warning: cast to pointer from integer of different size /tmp/ccD4qio5.s: Assembler messages: /tmp/ccD4qio5.s:795: Error: Incorrect register `%rax' used with `l' suffix /tmp/ccD4qio5.s:847: Error: Incorrect register `%rax' used with `l' suffix make[2]: *** [pre_stage2_exec-disk_io.o] Error 1 make[2]: Leaving directory `/sources/grub-0.97/stage2' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/sources/grub-0.97' make: *** [all] Error 2 root:/sources/grub-0.97# vi +795 /tmp/ccD4qio5.s "/tmp/ccD4qio5.s" [New File]
(In reply to comment #13) > Thanks, so i tried following action. > root:/sources/grub-0.97# vi +1852 stage2/asm.S > > - and $0xffffffff, %rsi > + and $0xffffffffffffffff, %rsi > - and $0xffffffff, %rdi > + and $0xffffffffffffffff, %rdi > I don't think they are correct. The correct ones may be and $0xffffffff, %esi and $0xffffffff, %edi > root:/sources/grub-0.97# make ... > boot.c: In function ‘load_image’: > boot.c:80: warning: cast from pointer to integer of different size > boot.c:80: warning: cast from pointer to integer of different size Those warnings have nothing to do with binutils. We can't help you here.
>I don't think they are correct. The correct ones may be >and $0xffffffff, %esi >and $0xffffffff, %edi so i tried another one root:/sources/grub-0.97# vi +1852 stage2/asm.S //and $0xffffffffffffffff, %rsi and $0xffffffff, %esi //and $0xffffffffffffffff, %rdi and $0xffffffff, %edi >> root:/sources/grub-0.97# make >... >> boot.c: In function ‘load_image’: >> boot.c:80: warning: cast from pointer to integer of different size >> boot.c:80: warning: cast from pointer to integer of different size >Those warnings have nothing to do with binutils. We can't help you here. Those warnings means nothing, but below error messages means something. "and $0xffffffff, %esi" "and $0xffffffffffffffff, %rsi" both modification result same error message: /tmp/ccgHKQuT.s:795: Error: Incorrect register `%rax' used with `l' suffix /tmp/ccgHKQuT.s:847: Error: Incorrect register `%rax' used with `l' suffix make[2]: *** [pre_stage2_exec-disk_io.o] Error 1 is the above error messages the bug? http://sourceware.org/bugzilla/show_bug.cgi?id=5080 TIA root:/sources/grub-0.97# make make all-recursive make[1]: Entering directory `/sources/grub-0.97' Making all in netboot make[2]: Entering directory `/sources/grub-0.97/netboot' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/sources/grub-0.97/netboot' Making all in stage2 make[2]: Entering directory `/sources/grub-0.97/stage2' if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-strict-aliasing -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_UFS2=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1 -DFSYS_JFS=1 -DFSYS_XFS=1 -DFSYS_ISO9660=1 -DUSE_MD5_PASSWORDS=1 -m64 -g -MT pre_stage2_exec-disk_io.o -MD -MP -MF ".deps/pre_stage2_exec-disk_io.Tpo" -c -o pre_stage2_exec-disk_io.o `test -f 'disk_io.c' || echo './'`disk_io.c; \ then mv -f ".deps/pre_stage2_exec-disk_io.Tpo" ".deps/pre_stage2_exec-disk_io.Po"; else rm -f ".deps/pre_stage2_exec-disk_io.Tpo"; exit 1; fi disk_io.c: In function ‘make_saved_active’: disk_io.c:473: warning: cast from pointer to integer of different size disk_io.c:473: warning: cast to pointer from integer of different size disk_io.c:473: warning: cast from pointer to integer of different size disk_io.c:473: warning: cast to pointer from integer of different size disk_io.c:473: warning: cast from pointer to integer of different size disk_io.c:473: warning: cast to pointer from integer of different size disk_io.c:480: warning: cast from pointer to integer of different size disk_io.c:480: warning: cast to pointer from integer of different size disk_io.c:486: warning: cast from pointer to integer of different size disk_io.c:486: warning: cast to pointer from integer of different size disk_io.c:489: warning: cast from pointer to integer of different size disk_io.c:489: warning: cast to pointer from integer of different size disk_io.c: In function ‘set_partition_hidden_flag’: disk_io.c:540: warning: cast from pointer to integer of different size disk_io.c:540: warning: cast to pointer from integer of different size disk_io.c:542: warning: cast from pointer to integer of different size disk_io.c:542: warning: cast to pointer from integer of different size disk_io.c: In function ‘next_bsd_partition’: disk_io.c:615: warning: cast from pointer to integer of different size disk_io.c:615: warning: cast to pointer from integer of different size disk_io.c:625: warning: cast from pointer to integer of different size disk_io.c:625: warning: cast to pointer from integer of different size disk_io.c:627: warning: cast from pointer to integer of different size disk_io.c:627: warning: cast to pointer from integer of different size disk_io.c:631: warning: cast from pointer to integer of different size disk_io.c:631: warning: cast to pointer from integer of different size disk_io.c:632: warning: cast from pointer to integer of different size disk_io.c:632: warning: cast to pointer from integer of different size disk_io.c:633: warning: cast from pointer to integer of different size disk_io.c:633: warning: cast to pointer from integer of different size disk_io.c:638: warning: cast from pointer to integer of different size disk_io.c:638: warning: cast to pointer from integer of different size disk_io.c: In function ‘next_pc_slice’: disk_io.c:670: warning: cast from pointer to integer of different size disk_io.c:670: warning: cast to pointer from integer of different size disk_io.c:687: warning: cast from pointer to integer of different size disk_io.c:687: warning: cast to pointer from integer of different size disk_io.c:687: warning: cast from pointer to integer of different size disk_io.c:687: warning: cast to pointer from integer of different size disk_io.c:687: warning: cast from pointer to integer of different size disk_io.c:687: warning: cast to pointer from integer of different size disk_io.c:691: warning: cast from pointer to integer of different size disk_io.c:691: warning: cast to pointer from integer of different size disk_io.c:703: warning: cast from pointer to integer of different size disk_io.c:703: warning: cast to pointer from integer of different size disk_io.c:704: warning: cast from pointer to integer of different size disk_io.c:704: warning: cast to pointer from integer of different size disk_io.c:705: warning: cast from pointer to integer of different size disk_io.c:705: warning: cast to pointer from integer of different size disk_io.c: In function ‘set_bootdev’: disk_io.c:1155: warning: cast to pointer from integer of different size disk_io.c: In function ‘grub_open’: disk_io.c:1593: warning: cast to pointer from integer of different size disk_io.c:1604: warning: cast to pointer from integer of different size disk_io.c: In function ‘grub_read’: disk_io.c:1703: warning: cast to pointer from integer of different size disk_io.c:1714: warning: cast to pointer from integer of different size disk_io.c:1722: warning: cast to pointer from integer of different size /tmp/ccgHKQuT.s: Assembler messages: /tmp/ccgHKQuT.s:795: Error: Incorrect register `%rax' used with `l' suffix /tmp/ccgHKQuT.s:847: Error: Incorrect register `%rax' used with `l' suffix make[2]: *** [pre_stage2_exec-disk_io.o] Error 1 make[2]: Leaving directory `/sources/grub-0.97/stage2' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/sources/grub-0.97' make: *** [all] Error 2 root:/sources/grub-0.97#
tried binutils-2.18.50, but had same error messages. disk_io.c seems need to be fixed to works with amd64. disk_io.c:1722: warning: cast to pointer from integer of different size /tmp/ccykZkkM.s: Assembler messages: /tmp/ccykZkkM.s:795: Error: Incorrect register `%rax' used with `l' suffix /tmp/ccykZkkM.s:847: Error: Incorrect register `%rax' used with `l' suffix make[2]: *** [pre_stage2_exec-disk_io.o] Error 1 make[2]: Leaving directory `/sources/grub-0.97/stage2' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/sources/grub-0.97' make: *** [all] Error 2 root:/sources/grub-0.97#
(In reply to comment #6) > Please provide a testcase. Objcopy works for me: > > bash-3.2$ cat x.c > void > cmain (void) > { > *((int *) 0x1000) = 2; > } > bash-3.2$ make > cc -O2 -c -o x.o x.c > ./ld -o x x.o -N -Ttext 0x100 > ./ld: warning: cannot find entry symbol _start; defaulting to 0000000000000100 > ./objcopy x y > cmp x y > bash-3.2$ The test does: $ cat x.c void cmain (void) { *((int *) 0x1000) = 2; } $ gcc -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000 x.c -o x2 /usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000002000 $ gcc -nostdlib -Wl,-N -Wl,-Ttext -Wl,8000 x.c -o x2 /usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000008000 $ objcopy -O binary x2 y2 $ objcopy -O binary x8 y8 $ cmp y2 y8 y2 y8 differ: byte 74, line 1 Note the -O binary that you didn't use. Also note that adding -j .text to the objcopy call fixes the problem. Like Alan Modra said, the difference is in the .eh_frame. I have no idea if grub needs the .eh_frame or not, I'm guessing not. Kurt
when good comes to bad, bad come to good.. year 2003: http://www.cygwin.com/ml/binutils/2003-06/msg00653.html year 2004: http://sources.redhat.com/ml/binutils/2004-03/msg00160.html year 2005: http://www.cygwin.com/ml/binutils/2005-02/msg00350.html