public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] Linker error : linking constant-gp files with non-constant gp fil
@ 2001-05-08  2:00 Sistla, Krishnakanth V
  2001-05-08  3:22 ` [Linux-ia64] Linker error : linking constant-gp files with non-constant gp fil es Keith Owens
  2001-05-08  3:26 ` David Mosberger
  0 siblings, 2 replies; 3+ messages in thread
From: Sistla, Krishnakanth V @ 2001-05-08  2:00 UTC (permalink / raw)
  To: linux-ia64

Hi all,

	I am trying to write a miscellanious driver and compile it into the
linux
	kernel. When i try to link two object files created by the below
mentioned 
	commands (during a build) i get the following error. could some help
me 
      please ?

Thanx in advance
KK



---------------------------------------------
kernel version 

linux-2.4.0test10-001115

--------------------------command sequence--

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
-fno-strict-aliasing 
-fomit-frame-pointer -pipe -Wa,-x -ffixed-r13 -mfixed-rangeñ0-f15,f32-f127
-funwind-tables 
-mconstant-gp   -c -o ia64pmon.o test.c

gcc  -D__KERNEL__ -I/usr/src/linux/include  -c -o ia64pmon_s.o test_s.S


ld  -r -o misc.o test.o test_s.o


ld: test_s.o: linking constant-gp files with non-constant-gp files
Bad value: failed to merge target specific data of the file test_s.o

----------------------------------------------------------------------------
------------------



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

* Re: [Linux-ia64] Linker error : linking constant-gp files with non-constant gp fil es
  2001-05-08  2:00 [Linux-ia64] Linker error : linking constant-gp files with non-constant gp fil Sistla, Krishnakanth V
@ 2001-05-08  3:22 ` Keith Owens
  2001-05-08  3:26 ` David Mosberger
  1 sibling, 0 replies; 3+ messages in thread
From: Keith Owens @ 2001-05-08  3:22 UTC (permalink / raw)
  To: linux-ia64

All objects that are linked into the kernel must be compiled with
-mconstant-gp.  All objects that are linked into modules must not be
compiled with -mconstant-gp.  Set your compile flags accordingly.



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

* Re: [Linux-ia64] Linker error : linking constant-gp files with non-constant gp fil es
  2001-05-08  2:00 [Linux-ia64] Linker error : linking constant-gp files with non-constant gp fil Sistla, Krishnakanth V
  2001-05-08  3:22 ` [Linux-ia64] Linker error : linking constant-gp files with non-constant gp fil es Keith Owens
@ 2001-05-08  3:26 ` David Mosberger
  1 sibling, 0 replies; 3+ messages in thread
From: David Mosberger @ 2001-05-08  3:26 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 08 May 2001 13:22:19 +1000, Keith Owens <kaos@ocs.com.au> said:

  Keith> All objects that are linked into the kernel must be compiled
  Keith> with -mconstant-gp.  All objects that are linked into modules
  Keith> must not be compiled with -mconstant-gp.  Set your compile
  Keith> flags accordingly.

That's not sufficient.  You need to use pretty much *all* the flags
that normal kernel compiles use, in particular the -mfixed* options
are important.

	--david


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

end of thread, other threads:[~2001-05-08  3:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-08  2:00 [Linux-ia64] Linker error : linking constant-gp files with non-constant gp fil Sistla, Krishnakanth V
2001-05-08  3:22 ` [Linux-ia64] Linker error : linking constant-gp files with non-constant gp fil es Keith Owens
2001-05-08  3:26 ` David Mosberger

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