Re: what is the function of entry.S?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 12 Nov 2005, Mulyadi Santosa wrote:

> 1. AFAIK, assembly source isn't mixed with normal C file header, but in 
> this case i saw "#include" directive referring to 5-6 headers. Is this 
> valid ?

It seems to compile fine for me, and several million other
Linux users, so I assume mixing assembly and C is cromulent.

> 2. Seems like ENTRY() is used for defining function, but from what I 
> read at "info ld":
> "The first instruction to execute in a program is called the "entry
> point".  You can use the `ENTRY' linker script command to set the entry
> point.  The argument is a symbol name:
>      ENTRY(SYMBOL)"
> 
> Does it mean, entry.S has multiple starting point?

It sure has.  Interrupt handling, fault handling, system
call entry, ...

> 3. If ENTRY() is indeed declaring a function, how someone call it?  by 
> using "extern" on another C source code? And how the C code refer to 
> the .S file? by pointing directly to the .S file or the header file 
> (.h)?

A number of the entry points are defined in
arch/i386/kernel/traps.c

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux