* Start symbol for an compressed kernel @ 2013-08-17 11:39 zhaobin xv 2013-08-17 13:48 ` Russell King - ARM Linux 0 siblings, 1 reply; 8+ messages in thread From: zhaobin xv @ 2013-08-17 11:39 UTC (permalink / raw) To: linux-arm-kernel how to find Start symbol for an compressed kernel for arm ^ permalink raw reply [flat|nested] 8+ messages in thread
* Start symbol for an compressed kernel 2013-08-17 11:39 Start symbol for an compressed kernel zhaobin xv @ 2013-08-17 13:48 ` Russell King - ARM Linux 2013-08-17 13:56 ` zhaobin xv 0 siblings, 1 reply; 8+ messages in thread From: Russell King - ARM Linux @ 2013-08-17 13:48 UTC (permalink / raw) To: linux-arm-kernel On Sat, Aug 17, 2013 at 07:39:46PM +0800, zhaobin xv wrote: > how to find Start symbol for an compressed kernel for arm The start address of a compressed kernel is the first byte of the image. Symbolically, that is 'start', which is a non-global symbol. However, this symbol is useless since it normally is zero, because the entire image is relocatable and therefore built for address zero. However, it is normal to load the image not at address zero. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Start symbol for an compressed kernel 2013-08-17 13:48 ` Russell King - ARM Linux @ 2013-08-17 13:56 ` zhaobin xv 2013-08-17 13:57 ` Russell King - ARM Linux 0 siblings, 1 reply; 8+ messages in thread From: zhaobin xv @ 2013-08-17 13:56 UTC (permalink / raw) To: linux-arm-kernel 2013/8/17 Russell King - ARM Linux <linux@arm.linux.org.uk>: > On Sat, Aug 17, 2013 at 07:39:46PM +0800, zhaobin xv wrote: >> how to find Start symbol for an compressed kernel for arm > > The start address of a compressed kernel is the first byte of the image. > > Symbolically, that is 'start', which is a non-global symbol. However, > this symbol is useless since it normally is zero, because the entire > image is relocatable and therefore built for address zero. > > However, it is normal to load the image not at address zero. why do U define ENTRY(_start)? Is _start the Start symbol? how to explain _start ^ permalink raw reply [flat|nested] 8+ messages in thread
* Start symbol for an compressed kernel 2013-08-17 13:56 ` zhaobin xv @ 2013-08-17 13:57 ` Russell King - ARM Linux 2013-08-17 14:03 ` zhaobin xv 2013-08-17 14:12 ` Alexander Shiyan 0 siblings, 2 replies; 8+ messages in thread From: Russell King - ARM Linux @ 2013-08-17 13:57 UTC (permalink / raw) To: linux-arm-kernel On Sat, Aug 17, 2013 at 09:56:14PM +0800, zhaobin xv wrote: > 2013/8/17 Russell King - ARM Linux <linux@arm.linux.org.uk>: > > On Sat, Aug 17, 2013 at 07:39:46PM +0800, zhaobin xv wrote: > >> how to find Start symbol for an compressed kernel for arm > > > > The start address of a compressed kernel is the first byte of the image. > > > > Symbolically, that is 'start', which is a non-global symbol. However, > > this symbol is useless since it normally is zero, because the entire > > image is relocatable and therefore built for address zero. > > > > However, it is normal to load the image not at address zero. > > why do U define ENTRY(_start)? > Is _start the Start symbol? > how to explain _start There is no _start symbol in the compressed kernel. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Start symbol for an compressed kernel 2013-08-17 13:57 ` Russell King - ARM Linux @ 2013-08-17 14:03 ` zhaobin xv 2013-08-17 14:16 ` Russell King - ARM Linux 2013-08-17 14:12 ` Alexander Shiyan 1 sibling, 1 reply; 8+ messages in thread From: zhaobin xv @ 2013-08-17 14:03 UTC (permalink / raw) To: linux-arm-kernel 2013/8/17 Russell King - ARM Linux <linux@arm.linux.org.uk>: > On Sat, Aug 17, 2013 at 09:56:14PM +0800, zhaobin xv wrote: >> 2013/8/17 Russell King - ARM Linux <linux@arm.linux.org.uk>: >> > On Sat, Aug 17, 2013 at 07:39:46PM +0800, zhaobin xv wrote: >> >> how to find Start symbol for an compressed kernel for arm >> > >> > The start address of a compressed kernel is the first byte of the image. >> > >> > Symbolically, that is 'start', which is a non-global symbol. However, >> > this symbol is useless since it normally is zero, because the entire >> > image is relocatable and therefore built for address zero. >> > >> > However, it is normal to load the image not at address zero. >> >> why do U define ENTRY(_start)? >> Is _start the Start symbol? >> how to explain _start > > There is no _start symbol in the compressed kernel. But there is ENTRY(_start) and _start in linux-2.6.22.6\arch\arm\boot\compressed/head.S ^ permalink raw reply [flat|nested] 8+ messages in thread
* Start symbol for an compressed kernel 2013-08-17 14:03 ` zhaobin xv @ 2013-08-17 14:16 ` Russell King - ARM Linux 0 siblings, 0 replies; 8+ messages in thread From: Russell King - ARM Linux @ 2013-08-17 14:16 UTC (permalink / raw) To: linux-arm-kernel On Sat, Aug 17, 2013 at 10:03:32PM +0800, zhaobin xv wrote: > 2013/8/17 Russell King - ARM Linux <linux@arm.linux.org.uk>: > > On Sat, Aug 17, 2013 at 09:56:14PM +0800, zhaobin xv wrote: > >> 2013/8/17 Russell King - ARM Linux <linux@arm.linux.org.uk>: > >> > On Sat, Aug 17, 2013 at 07:39:46PM +0800, zhaobin xv wrote: > >> >> how to find Start symbol for an compressed kernel for arm > >> > > >> > The start address of a compressed kernel is the first byte of the image. > >> > > >> > Symbolically, that is 'start', which is a non-global symbol. However, > >> > this symbol is useless since it normally is zero, because the entire > >> > image is relocatable and therefore built for address zero. > >> > > >> > However, it is normal to load the image not at address zero. > >> > >> why do U define ENTRY(_start)? > >> Is _start the Start symbol? > >> how to explain _start > > > > There is no _start symbol in the compressed kernel. > > But there is ENTRY(_start) and _start in > linux-2.6.22.6\arch\arm\boot\compressed/head.S There is no mainline -final kernel with ENTRY(_start) in that file. I would be really surprised to find that a stable kernel ever introduced such a thing without it being in a mainline kernel first. Therefore, I believe you are mistaken that a vanilla 2.6.22.6 has this. You may have a modified 2.6.22.6 kernel source there. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Start symbol for an compressed kernel 2013-08-17 13:57 ` Russell King - ARM Linux 2013-08-17 14:03 ` zhaobin xv @ 2013-08-17 14:12 ` Alexander Shiyan 2013-08-17 14:19 ` Russell King - ARM Linux 1 sibling, 1 reply; 8+ messages in thread From: Alexander Shiyan @ 2013-08-17 14:12 UTC (permalink / raw) To: linux-arm-kernel > 2013/8/17 Russell King - ARM Linux <linux@arm.linux.org.uk>: > > On Sat, Aug 17, 2013 at 09:56:14PM +0800, zhaobin xv wrote: > >> 2013/8/17 Russell King - ARM Linux <linux@arm.linux.org.uk>: > >> > On Sat, Aug 17, 2013 at 07:39:46PM +0800, zhaobin xv wrote: > >> >> how to find Start symbol for an compressed kernel for arm > >> > > >> > The start address of a compressed kernel is the first byte of the image. > >> > > >> > Symbolically, that is 'start', which is a non-global symbol. However, > >> > this symbol is useless since it normally is zero, because the entire > >> > image is relocatable and therefore built for address zero. > >> > > >> > However, it is normal to load the image not at address zero. > >> > >> why do U define ENTRY(_start)? > >> Is _start the Start symbol? > >> how to explain _start > > > > There is no _start symbol in the compressed kernel. > > But there is ENTRY(_start) and _start in > linux-2.6.22.6\arch\arm\boot\compressed/head.S I always thought that the "start" is necessary for the compiler to tell it what is at the beginning of the program. So, on my opinion this is just a way to tell to gcc where we should place initial kernel data. --- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Start symbol for an compressed kernel 2013-08-17 14:12 ` Alexander Shiyan @ 2013-08-17 14:19 ` Russell King - ARM Linux 0 siblings, 0 replies; 8+ messages in thread From: Russell King - ARM Linux @ 2013-08-17 14:19 UTC (permalink / raw) To: linux-arm-kernel On Sat, Aug 17, 2013 at 06:12:04PM +0400, Alexander Shiyan wrote: > > 2013/8/17 Russell King - ARM Linux <linux@arm.linux.org.uk>: > > > On Sat, Aug 17, 2013 at 09:56:14PM +0800, zhaobin xv wrote: > > >> 2013/8/17 Russell King - ARM Linux <linux@arm.linux.org.uk>: > > >> > On Sat, Aug 17, 2013 at 07:39:46PM +0800, zhaobin xv wrote: > > >> >> how to find Start symbol for an compressed kernel for arm > > >> > > > >> > The start address of a compressed kernel is the first byte of the image. > > >> > > > >> > Symbolically, that is 'start', which is a non-global symbol. However, > > >> > this symbol is useless since it normally is zero, because the entire > > >> > image is relocatable and therefore built for address zero. > > >> > > > >> > However, it is normal to load the image not at address zero. > > >> > > >> why do U define ENTRY(_start)? > > >> Is _start the Start symbol? > > >> how to explain _start > > > > > > There is no _start symbol in the compressed kernel. > > > > But there is ENTRY(_start) and _start in > > linux-2.6.22.6\arch\arm\boot\compressed/head.S > > I always thought that the "start" is necessary for the compiler to tell it > what is at the beginning of the program. So, on my opinion this is just > a way to tell to gcc where we should place initial kernel data. There is a _start symbol in arch/arm/boot/compressed/vmlinux.lds.in which is used to define the entry point for linker purposes (and used to also be used for some calculations in head.S). It's never been defined in head.S though. As I've already pointed out, the symbol is practically meaningless - all the symbols in the compressed image are merely offsets from the address you load the image at because it is position independent code. If you load the image at 0x8000, you call it at 0x8000. If you load the image at 0x12345678, then you call it at 0x12345678 and not where this _start symbol says you should. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-08-17 14:19 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-08-17 11:39 Start symbol for an compressed kernel zhaobin xv 2013-08-17 13:48 ` Russell King - ARM Linux 2013-08-17 13:56 ` zhaobin xv 2013-08-17 13:57 ` Russell King - ARM Linux 2013-08-17 14:03 ` zhaobin xv 2013-08-17 14:16 ` Russell King - ARM Linux 2013-08-17 14:12 ` Alexander Shiyan 2013-08-17 14:19 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).