Subject: replacement of GCC built-in variables in armcc

From: "artis" <[email-masked]>
Date: Thu, 9 Mar 2000 17:22:24 +0800

Hi folks,

Does anyone know how to use the equal GCC built-in variables 'etext', 
'_fbss', 'etext', '_fdata', 'edata' in armcc of SDT 2.50?

I want to porting Linux to a proprietary ARM7 core MCU, but the above 
variables in the boot code are bother me hard.

If some one knows or experiences the compiler compatibility issue, plz 
give me some advise.

Thanks a ton.

---

From: Philip Blundell <[email-masked]>
Date: Thu, 09 Mar 2000 09:44:52 +0000

>variables in the boot code are bother me hard.

You will probably have far worse problems than this if you want to build 
the kernel with non-GNU tools.  Why don't you want to use GCC and GNU binutils?

These symbols are actually nothing to do with GCC.  They are created by the 
linker to delineate the various segments in the output image.  (I've never 
come across _fbss and _fdata, for that matter.)

p.

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: "artis" <[email-masked]>
Date: Fri, 10 Mar 2000 09:03:31 +0800

Philip,

Thanks a lots. Although I am an advocacy of GNU but speak truly, SDT has
armulator and source (symbolic) debugger for me to hacking the kernel
with less pain (I think so).

So I would rather like to look for some methods which can work around
these built-in variables. If there are deadly no way to work around then I
will use GCC. But I still eager to know how to do a thing with
more than 2  ways.

Larry Wall said: There are more than one way to do a thing.

Philip, Thanks.
Somebody's advise here are still welcome and appreciated.

Artis J.

---

From: Philip Blundell <[email-masked]>
Date: Fri, 10 Mar 2000 07:20:14 +0000

>will use GCC. But I still eager to know how to do a thing with

Well, I won't say it's impossible to build the kernel with the ARM SDT.  But, 
personally, I would spend the time on either improving the GDB+ARMulator 
combination, or fixing GCC and/or SDT so that the SDT debugger can be used on 
images built with GNU tools.  (The latter should work in theory but there 
seems to be some incompatibility.)

The problem is that the kernel is full of GNU language extensions; __inline__, 
__attribute__ and the like.  Plus there is a fair amount of assembly code in 
GNU syntax.

p.

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Fri, 10 Mar 2000 21:05:59 +0000 (GMT)

> will use GCC. But I still eager to know how to do a thing with

Compiling the kernel with non-GCC isn't really a good idea.  As Phil says,
a lot of the extensions are used.  In addition to this, a lot of the kernel
is tuned specifically to allow GCC to optimise effectively to produce
efficient code.

PS, this should really be on linux-arm-kernel.  See the web site for more
information.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: Philip Blundell <[email-masked]>
Date: Fri, 10 Mar 2000 22:30:08 +0000

>In addition to this, a lot of the kernel

Actually, who knows, the SDT compiler might generate sufficiently better code 
to negate this effect.

p.