* __init()
@ 2005-08-11 12:23 raja
2005-08-11 12:47 ` __init() linux-os (Dick Johnson)
0 siblings, 1 reply; 4+ messages in thread
From: raja @ 2005-08-11 12:23 UTC (permalink / raw)
To: linux-c-programming, linux-kernel
Hi,
Is there any way to execute my own __init() instead of default
__init() while running an executable.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: __init()
2005-08-11 12:23 __init() raja
@ 2005-08-11 12:47 ` linux-os (Dick Johnson)
2005-08-12 19:29 ` fdisk & LBA Nanakos Chrysostomos
0 siblings, 1 reply; 4+ messages in thread
From: linux-os (Dick Johnson) @ 2005-08-11 12:47 UTC (permalink / raw)
To: raja; +Cc: linux-c-programming, linux-kernel
On Thu, 11 Aug 2005, raja wrote:
> Hi,
> Is there any way to execute my own __init() instead of default
> __init() while running an executable.
> -
Sure you link your object file with your own instead of using
the default....
gcc -c -o myprog.o myprog.c
as -o start.o start.S
ld -o myprog myprog.o start.o /lib/libc.so.6
| | |___ runtime lib
| |__________________ Your startup
|__________________________ Your program
Startup starts with a label _start. You may have to write it
in assembly. It calls main() and must never return. Instead
it calls exit() with whatever main() returned, to quit.
__init() is some M$ thing. Linux executables start with
_start().
Cheers,
Dick Johnson
Penguin : Linux version 2.6.12 on an i686 machine (5537.79 BogoMips).
Warning : 98.36% of all statistics are fiction.
.
I apologize for the following. I tried to kill it with the above dot :
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* fdisk & LBA
2005-08-11 12:47 ` __init() linux-os (Dick Johnson)
@ 2005-08-12 19:29 ` Nanakos Chrysostomos
2005-08-12 19:45 ` Lennart Sorensen
0 siblings, 1 reply; 4+ messages in thread
From: Nanakos Chrysostomos @ 2005-08-12 19:29 UTC (permalink / raw)
To: linux-c-programming; +Cc: linux-kernel
Hi all,i want to retrieve the partition table of a primary extended
partition.
My MBR partition table ,says that the LBA Partition Start sector for the
extended partition is 10281600.It is the same that i find with my C code
and through fdisk usage.
How can i use this value to seek(lseek) to this point through the main
block file (/dev/hda or /dev/hdb) and read the partition table of the
logical partition?
Thanks in advance.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fdisk & LBA
2005-08-12 19:29 ` fdisk & LBA Nanakos Chrysostomos
@ 2005-08-12 19:45 ` Lennart Sorensen
0 siblings, 0 replies; 4+ messages in thread
From: Lennart Sorensen @ 2005-08-12 19:45 UTC (permalink / raw)
To: Nanakos Chrysostomos; +Cc: linux-c-programming, linux-kernel
On Fri, Aug 12, 2005 at 10:29:13PM +0300, Nanakos Chrysostomos wrote:
> Hi all,i want to retrieve the partition table of a primary extended
> partition.
> My MBR partition table ,says that the LBA Partition Start sector for the
> extended partition is 10281600.It is the same that i find with my C code
> and through fdisk usage.
> How can i use this value to seek(lseek) to this point through the main
> block file (/dev/hda or /dev/hdb) and read the partition table of the
> logical partition?
Multiply by the sector size (probably 512 bytes).
Len Sorensen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-08-12 19:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-11 12:23 __init() raja
2005-08-11 12:47 ` __init() linux-os (Dick Johnson)
2005-08-12 19:29 ` fdisk & LBA Nanakos Chrysostomos
2005-08-12 19:45 ` Lennart Sorensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®