[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/5453] New: objcopy does not seem to work for absolute addr
From: |
mra at hp dot com |
Subject: |
[Bug binutils/5453] New: objcopy does not seem to work for absolute addresses on i386 OSes installed on x86_64 hardware |
Date: |
6 Dec 2007 22:29:43 -0000 |
While trying to build grub on a Core 2 Duo system that has i386 Fedora installed
on it I was stopped at ./configure time due to failing the following check:
dnl Some versions of `objcopy -O binary' vary their output depending
dnl on the link address.
AC_DEFUN([grub_PROG_OBJCOPY_ABSOLUTE],
[AC_MSG_CHECKING([whether ${OBJCOPY} works for absolute addresses])
AC_CACHE_VAL(grub_cv_prog_objcopy_absolute,
[cat > conftest.c <<\EOF
void
cmain (void)
{
*((int *) 0x1000) = 2;
}
EOF
if AC_TRY_EVAL(ac_compile) && test -s conftest.o; then :
else
AC_MSG_ERROR([${CC-cc} cannot compile C source code])
fi
grub_cv_prog_objcopy_absolute=yes
for link_addr in 2000 8000 7C00; do
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext
-Wl,$link_addr conftest.o -o conftest.exec]); then :
else
AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
fi
if AC_TRY_COMMAND([${OBJCOPY-objcopy} -O binary conftest.exec conftest]);
then :
else
AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files])
fi
if test ! -f conftest.old || AC_TRY_COMMAND([cmp -s conftest.old conftest]);
then
mv -f conftest conftest.old
else
## ./configure fails out here
grub_cv_prog_objcopy_absolute=no
break
fi
done
rm -f conftest*])
AC_MSG_RESULT([$grub_cv_prog_objcopy_absolute])])
This test initially failed with Fedora's 2.17 based objcopy rpm, but I also was
able to get the same behavior from an unpatched copy of binutils-2.18.50.tar.gz.
I tried building grub on a Pentium 4 system with i386 Fedora and that worked
just fine. I also was able to successfully build on my Core 2 Duo system with
the x86_64 version of RHEL 5.1.
--
Summary: objcopy does not seem to work for absolute addresses on
i386 OSes installed on x86_64 hardware
Product: binutils
Version: 2.18
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: mra at hp dot com
CC: bug-binutils at gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=5453
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/5453] New: objcopy does not seem to work for absolute addresses on i386 OSes installed on x86_64 hardware,
mra at hp dot com <=