public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Reg. sparc64 linker error
@ 2002-06-04 20:14 Shanti Katta
  2002-06-04 23:54 ` Ben Collins
  0 siblings, 1 reply; 3+ messages in thread
From: Shanti Katta @ 2002-06-04 20:14 UTC (permalink / raw)
  To: sparclinux, linux-kernel

Hi,
I am trying to port user-mode-linux(uml) to Sparc64 arch. I am running a
custom built 2.4.18 kernel on debian (sid), Ultra 1 system. I have also
created static links sparc64-linux-ld and sparc64-linux-as. When I build
the uml sources, I am getting the following linker error:

gcc-3.0  -Wall -Wstrict-prototypes -Wno-trigraphs -O2
-fomit-frame-pointer -fno-strict-aliasing -fno-common -U__sparc64__
-Usparc64 -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow
-ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare
-Wa,--undeclared-regs -D__arch_um__ -DSUBARCH=\"sparc64\" -DNESTING=0
-D_LARGEFILE64_SOURCE  -I/home/shanti/UML/UMLSparc64/arch/um/include
-D_GNU_SOURCE -c -o unmap.o unmap.c
ld -r -o unmap_fin.o unmap.o -lc -L/usr/lib
ld: warning: sparc:v9 architecture of input file `unmap.o' is
incompatible with sparc output
ld: BFD 2.12.90.0.1 20020307 Debian/GNU Linux assertion fail
../../bfd/elflink.h:2817
ld: final link failed: Bad value

I am using gcc-3.0 with binuitls 2.12.90.0.0.1-5. When I tried using gcc
with egcs64, it gave me a bunch of parse errors. Hence, I switched to
gcc-3.0. But now, I have this linker error. Any pointers in this
direction would be appreciated.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Reg. sparc64 linker error
  2002-06-04 20:14 Reg. sparc64 linker error Shanti Katta
@ 2002-06-04 23:54 ` Ben Collins
  2002-06-05  0:18   ` Ben Collins
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Collins @ 2002-06-04 23:54 UTC (permalink / raw)
  To: Shanti Katta; +Cc: sparclinux, linux-kernel

On Tue, Jun 04, 2002 at 04:14:26PM -0400, Shanti Katta wrote:
> Hi,
> I am trying to port user-mode-linux(uml) to Sparc64 arch. I am running a
> custom built 2.4.18 kernel on debian (sid), Ultra 1 system. I have also
> created static links sparc64-linux-ld and sparc64-linux-as. When I build
> the uml sources, I am getting the following linker error:
> 
> gcc-3.0  -Wall -Wstrict-prototypes -Wno-trigraphs -O2
> -fomit-frame-pointer -fno-strict-aliasing -fno-common -U__sparc64__
> -Usparc64 -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow
> -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare
> -Wa,--undeclared-regs -D__arch_um__ -DSUBARCH=\"sparc64\" -DNESTING=0
> -D_LARGEFILE64_SOURCE  -I/home/shanti/UML/UMLSparc64/arch/um/include
> -D_GNU_SOURCE -c -o unmap.o unmap.c
> ld -r -o unmap_fin.o unmap.o -lc -L/usr/lib
> ld: warning: sparc:v9 architecture of input file `unmap.o' is
> incompatible with sparc output
> ld: BFD 2.12.90.0.1 20020307 Debian/GNU Linux assertion fail
> ../../bfd/elflink.h:2817
> ld: final link failed: Bad value
> 
> I am using gcc-3.0 with binuitls 2.12.90.0.0.1-5. When I tried using gcc
> with egcs64, it gave me a bunch of parse errors. Hence, I switched to
> gcc-3.0. But now, I have this linker error. Any pointers in this
> direction would be appreciated.

gcc-3.0 may not work well. Eitherway, copy the CFLAGS/LDFLAGS from
arch/sparc64/Makefile. For this example above, you are missing -m64 as
an option to make it output 64bit executables.

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://linux1394.sourceforge.net/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Reg. sparc64 linker error
  2002-06-04 23:54 ` Ben Collins
@ 2002-06-05  0:18   ` Ben Collins
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Collins @ 2002-06-05  0:18 UTC (permalink / raw)
  To: Shanti Katta; +Cc: sparclinux, linux-kernel

On Tue, Jun 04, 2002 at 07:54:43PM -0400, Ben Collins wrote:
> On Tue, Jun 04, 2002 at 04:14:26PM -0400, Shanti Katta wrote:
> > Hi,
> > I am trying to port user-mode-linux(uml) to Sparc64 arch. I am running a
> > custom built 2.4.18 kernel on debian (sid), Ultra 1 system. I have also
> > created static links sparc64-linux-ld and sparc64-linux-as. When I build
> > the uml sources, I am getting the following linker error:
> > 
> > gcc-3.0  -Wall -Wstrict-prototypes -Wno-trigraphs -O2
> > -fomit-frame-pointer -fno-strict-aliasing -fno-common -U__sparc64__
> > -Usparc64 -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow
> > -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare
> > -Wa,--undeclared-regs -D__arch_um__ -DSUBARCH=\"sparc64\" -DNESTING=0
> > -D_LARGEFILE64_SOURCE  -I/home/shanti/UML/UMLSparc64/arch/um/include
> > -D_GNU_SOURCE -c -o unmap.o unmap.c
> > ld -r -o unmap_fin.o unmap.o -lc -L/usr/lib
> > ld: warning: sparc:v9 architecture of input file `unmap.o' is
> > incompatible with sparc output
> > ld: BFD 2.12.90.0.1 20020307 Debian/GNU Linux assertion fail
> > ../../bfd/elflink.h:2817
> > ld: final link failed: Bad value
> > 
> > I am using gcc-3.0 with binuitls 2.12.90.0.0.1-5. When I tried using gcc
> > with egcs64, it gave me a bunch of parse errors. Hence, I switched to
> > gcc-3.0. But now, I have this linker error. Any pointers in this
> > direction would be appreciated.
> 
> gcc-3.0 may not work well. Eitherway, copy the CFLAGS/LDFLAGS from
> arch/sparc64/Makefile. For this example above, you are missing -m64 as
> an option to make it output 64bit executables.

Oh, my mistake. The CFLAGS are fine, but the LDFLAGS aren't. Looks like
it is missing "-m elf64_sparc".

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://linux1394.sourceforge.net/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-06-05  0:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-04 20:14 Reg. sparc64 linker error Shanti Katta
2002-06-04 23:54 ` Ben Collins
2002-06-05  0:18   ` Ben Collins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox