Question on device driver ?

Discussion in 'C Programming' started by P Shetty, Sep 16, 2007.

  1. P Shetty

    P Shetty Guest

    Hi to All,

    In linux device driver programming Why we insert obj. file [module] not
    ..exe file in to the Kernel ?
     
    P Shetty, Sep 16, 2007
    #1
    1. Advertising

  2. P Shetty

    Jack Klein Guest

    On Sun, 16 Sep 2007 14:21:47 +0200 (CEST), P Shetty <>
    wrote in comp.lang.c:

    > Hi to All,
    >
    > In linux device driver programming Why we insert obj. file [module] not
    > .exe file in to the Kernel ?


    This is not a C language question, it is a Linux operating system
    question. Ask in one of the news:comp.os.linux.development.* groups.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://c-faq.com/
    comp.lang.c++ http://www.parashift.com/c -faq-lite/
    alt.comp.lang.learn.c-c++
    http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
     
    Jack Klein, Sep 16, 2007
    #2
    1. Advertising

  3. In article <>,
    Jack Klein <> wrote:
    >On Sun, 16 Sep 2007 14:21:47 +0200 (CEST), P Shetty <>
    >wrote in comp.lang.c:
    >
    >> Hi to All,
    >>
    >> In linux device driver programming Why we insert obj. file [module] not
    >> .exe file in to the Kernel ?

    >
    >This is not a C language question, it is a Linux operating system
    >question. Ask in one of the news:comp.os.linux.development.* groups.


    Actually, it's not really a question at all, in any meaningful sense of
    the word. It is pretty much equivalent to:

    Why do dogs have 10 legs?
     
    Kenny McCormack, Sep 16, 2007
    #3
  4. P Shetty

    P Shetty Guest

    I don't understand what you mean by that!

    Does no one here at all write device drivers ?!?!?!?

    :(


    On 16 Sep 2007 at 18:51, Kenny McCormack wrote:
    > In article <>,
    > Jack Klein <> wrote:
    >>On Sun, 16 Sep 2007 14:21:47 +0200 (CEST), P Shetty <>
    >>wrote in comp.lang.c:
    >>
    >>> Hi to All,
    >>>
    >>> In linux device driver programming Why we insert obj. file [module] not
    >>> .exe file in to the Kernel ?

    >>
    >>This is not a C language question, it is a Linux operating system
    >>question. Ask in one of the news:comp.os.linux.development.* groups.

    >
    > Actually, it's not really a question at all, in any meaningful sense of
    > the word. It is pretty much equivalent to:
    >
    > Why do dogs have 10 legs?
    >
     
    P Shetty, Sep 16, 2007
    #4
  5. P Shetty

    Guest

    On 16 Sep, 20:21, P Shetty <> wrote:

    > Does no one here at all write device drivers ?!?!?!?


    Probably some people here do. However, they don't talk about it here -
    they talk aboput it in newsgroups relating to their operating systems.
    Jack has pointed some suitable ones out for you. Here, people just
    talk about the standard C language. And moan about people who put
    their replies in front of the text they are replying to.
     
    , Sep 16, 2007
    #5
  6. P Shetty

    runner Guest

    "P Shetty" <> wrote in message
    news:...
    > Hi to All,
    >
    > In linux device driver programming Why we insert obj. file [module] not
    > .exe file in to the Kernel ?
    >


    EXEs are "stand alone" units, applications. They
    run at a higher level with respect to the Kernel.
    EXEs have a "main" function, OBJs may not have
    one. OBJs are pieces of code. Being pieces of
    code they are well suited to be used as extensions
    for different kind of cores (kernels being one)
     
    runner, Sep 16, 2007
    #6
  7. In article <>,
    P Shetty <> wrote:

    >In linux device driver programming Why we insert obj. file [module] not
    >.exe file in to the Kernel ?


    By definition, an operating system kernel is a single program.
    (Though QNX and Plan9 might fudge on that definition.)

    You are proposing to add additional *programs*, rather than
    to add additional *routines*.

    Besides, Linux doesn't use .exe files for its programs -- .exe files
    are Windows (or some other operating systems, such as VMS.)

    --
    If you lie to the compiler, it will get its revenge. -- Henry Spencer
     
    Walter Roberson, Sep 16, 2007
    #7
  8. >I don't understand what you mean by that!
    >
    >Does no one here at all write device drivers ?!?!?!?


    It's off-topic for this group. Some people in this group may raise
    pit bulls, but that's off-topic too. Device drivers are system-specific.
    There are many C implementations that don't use *.obj or *.exe files
    at all. I thought Linux was one of these.

    >>>> Hi to All,
    >>>>
    >>>> In linux device driver programming Why we insert obj. file [module] not
    >>>> .exe file in to the Kernel ?
     
    Gordon Burditt, Sep 16, 2007
    #8
  9. P Shetty

    Tor Rustad Guest

    Re: Question on device driver ? [OT]

    P Shetty wrote:
    > Hi to All,
    >
    > In linux device driver programming Why we insert obj. file [module] not
    > .exe file in to the Kernel ?


    You can view the kernel as a single C program executing in a
    freestanding environment, where the device drivers interface the
    hardware for it.


    The drivers need to handle hardware, service interrupts, there is no
    time for waiting for some task manager, or wasting time on process
    swapping...


    In kernel space, there is only one program executing, and users like to
    be able to install new drivers, without being forced to re-boot or
    re-compile their system.

    So, having dynamically loadable kernel modules, is a major advantage.

    --
    Tor <torust [at] online [dot] no>
     
    Tor Rustad, Sep 16, 2007
    #9
  10. P Shetty

    CBFalconer Guest

    runner wrote:
    > "P Shetty" <> wrote in message
    >
    >> In linux device driver programming Why we insert obj. file
    >> [module] not .exe file in to the Kernel ?

    >
    > EXEs are "stand alone" units, applications. They run at a higher
    > level with respect to the Kernel. EXEs have a "main" function,
    > OBJs may not have one. OBJs are pieces of code. Being pieces of
    > code they are well suited to be used as extensions for different
    > kind of cores (kernels being one)


    Both EXE and OBJ files are peculiar to specific systems, mostly
    Windoze, and are thus firmly off topic on c.l.c.

    --
    Chuck F (cbfalconer at maineline dot net)
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net>



    --
    Posted via a free Usenet account from http://www.teranews.com
     
    CBFalconer, Sep 16, 2007
    #10
  11. P Shetty

    runner Guest

    "CBFalconer" <> wrote in message
    news:...
    > runner wrote:
    > > "P Shetty" <> wrote in message
    > >
    > >> In linux device driver programming Why we insert obj. file
    > >> [module] not .exe file in to the Kernel ?

    > >
    > > EXEs are "stand alone" units, applications. They run at a higher
    > > level with respect to the Kernel. EXEs have a "main" function,
    > > OBJs may not have one. OBJs are pieces of code. Being pieces of
    > > code they are well suited to be used as extensions for different
    > > kind of cores (kernels being one)

    >
    > Both EXE and OBJ files are peculiar to specific systems, mostly
    > Windoze, and are thus firmly off topic on c.l.c.
    >


    If the OP had a clear idea of the differences bewteen
    executables and object code in general, he/she wouldn't
    have any problem in answering to his/her own question.
    Such a difference, i guess, should still belong to comp.lang.C.
     
    runner, Sep 17, 2007
    #11
  12. P Shetty

    Sjouke Burry Guest

    wrote:
    > On 16 Sep, 20:21, P Shetty <> wrote:
    >
    >> Does no one here at all write device drivers ?!?!?!?

    >
    > Probably some people here do. However, they don't talk about it here -
    > they talk aboput it in newsgroups relating to their operating systems.
    > Jack has pointed some suitable ones out for you. Here, people just
    > talk about the standard C language. And moan about people who put
    > their replies in front of the text they are replying to.
    >

    I did.
    on a pdp 7 18 bit 8K computer,pdp 11-3, arc310, bbc_b , xt, at, pentium ,
    in assembler,fortran, basic, c and(reluctantly) in c++(486 and higher).
    And I am happy to forget about most of them.
    But that is totally system dependent, and as such of course not portable.
    As long as you work on only 1 system, read manuals, search for
    examples of drivers, and dont count on much support of this newsgroup.
    Try to find newsgroups closer to your platform, because it is impossible
    to advise you on a general newsgroup.
     
    Sjouke Burry, Sep 17, 2007
    #12
  13. P Shetty

    Flash Gordon Guest

    runner wrote, On 17/09/07 01:19:
    > "CBFalconer" <> wrote in message
    > news:...
    >> runner wrote:
    >>> "P Shetty" <> wrote in message
    >>>
    >>>> In linux device driver programming Why we insert obj. file
    >>>> [module] not .exe file in to the Kernel ?
    >>> EXEs are "stand alone" units, applications. They run at a higher
    >>> level with respect to the Kernel. EXEs have a "main" function,
    >>> OBJs may not have one. OBJs are pieces of code. Being pieces of
    >>> code they are well suited to be used as extensions for different
    >>> kind of cores (kernels being one)

    >> Both EXE and OBJ files are peculiar to specific systems, mostly
    >> Windoze, and are thus firmly off topic on c.l.c.
    >>

    >
    > If the OP had a clear idea of the differences bewteen
    > executables and object code in general, he/she wouldn't
    > have any problem in answering to his/her own question.


    Possibly true.

    > Such a difference, i guess, should still belong to comp.lang.C.


    I definitely disagree with this. It is no more to do with C than it is
    Fortran, Pascal or many other language. Either a more general group than
    comp.lang.c would be appropriate if discussing general principals or a
    group dedicated to the specific target if talking about a specific
    target. Groups of both types exist for good reasons.
    --
    Flash Gordon
     
    Flash Gordon, Sep 17, 2007
    #13
  14. P Shetty

    runner Guest

    "Flash Gordon" <> wrote in message
    news:-gordon.me.uk...
    > runner wrote, On 17/09/07 01:19:
    > > "CBFalconer" <> wrote in message
    > > news:...
    > >> runner wrote:
    > >>> "P Shetty" <> wrote in message
    > >>>
    > >>>> In linux device driver programming Why we insert obj. file
    > >>>> [module] not .exe file in to the Kernel ?
    > >>> EXEs are "stand alone" units, applications. They run at a higher
    > >>> level with respect to the Kernel. EXEs have a "main" function,
    > >>> OBJs may not have one. OBJs are pieces of code. Being pieces of
    > >>> code they are well suited to be used as extensions for different
    > >>> kind of cores (kernels being one)
    > >> Both EXE and OBJ files are peculiar to specific systems, mostly
    > >> Windoze, and are thus firmly off topic on c.l.c.
    > >>

    > >
    > > If the OP had a clear idea of the differences bewteen
    > > executables and object code in general, he/she wouldn't
    > > have any problem in answering to his/her own question.

    >
    > Possibly true.
    >
    > > Such a difference, i guess, should still belong to comp.lang.C.

    >
    > I definitely disagree with this. It is no more to do with C than it is
    > Fortran, Pascal or many other language. Either a more general group than
    > comp.lang.c would be appropriate if discussing general principals or a
    > group dedicated to the specific target if talking about a specific
    > target. Groups of both types exist for good reasons.
    > --
    > Flash Gordon


    If an OP cannot tell the difference between a couple of
    concepts (because that's what he/she's looking for), it would
    be harder for him/her to find the right place to ask the question.
     
    runner, Sep 17, 2007
    #14
  15. P Shetty

    Flash Gordon Guest

    runner wrote, On 17/09/07 21:58:
    > "Flash Gordon" <> wrote in message
    > news:-gordon.me.uk...
    >> runner wrote, On 17/09/07 01:19:


    <snip off topic stuff>

    >>> Such a difference, i guess, should still belong to comp.lang.C.

    >> I definitely disagree with this. It is no more to do with C than it is
    >> Fortran, Pascal or many other language. Either a more general group than
    >> comp.lang.c would be appropriate if discussing general principals or a
    >> group dedicated to the specific target if talking about a specific
    >> target. Groups of both types exist for good reasons.
    >> --
    >> Flash Gordon


    Please don't quote signatures, the bit typically after the "-- " unless
    you are actually commenting on them.

    > If an OP cannot tell the difference between a couple of
    > concepts (because that's what he/she's looking for), it would
    > be harder for him/her to find the right place to ask the question.


    So? Are you claiming you don't know the difference between the concepts
    and so find it hard to find the correct place as well? Someone that does
    not know anything about string theory might find it harder to find the
    right place to ask, it does not make that topical here either. In any
    case, at least one person did suggest where the question would be more
    appropriate.
    --
    Flash Gordon
     
    Flash Gordon, Sep 17, 2007
    #15
  16. P Shetty

    runner Guest

    "runner" wrote:
    > > If an OP cannot tell the difference between a couple of
    > > concepts (because that's what he/she's looking for), it would
    > > be harder for him/her to find the right place to ask the question.


    "Flash Gordon" wrote:
    > So? Are you claiming you don't know the difference between the concepts
    > and so find it hard to find the correct place as well? Someone that does
    > not know anything about string theory might find it harder to find the
    > right place to ask,


    Ok

    > it does not make that topical here either.


    I never said it does. I just dropped the "Is It Off Topic?"
    thing because i didn't want to start another long thread
    about what is off topic and what is not.

    Executables and object code are general concepts
    belonging to several programming languages.
    Loops are general concepts belonging to several
    programming languages, but they are not off topic.

    > In any
    > case, at least one person did suggest where the question would be more
    > appropriate.


    I saw that.

    --
     
    runner, Sep 18, 2007
    #16
  17. P Shetty wrote:
    >
    > I don't understand what you mean by that!
    >
    > Does no one here at all write device drivers ?!?!?!?

    [...]

    I did, long ago. However, device drivers are, by there very nature,
    very platform-specific. And, as such, any discussion about how to
    write a device driver belongs in a group devoted to programming on
    that platform.

    As someone else pointed out, there is an enture tree of such groups
    under comp.os.linux.development.

    > >>> In linux device driver programming Why we insert obj. file
    > >>> [module] not .exe file in to the Kernel ?


    And you'll probably get better answers if you use the proper
    terminology. I don't believe that Linux use ".obj" and ".exe"
    files. (Or, at least, it doesn't call them by those names.)

    --
    +-------------------------+--------------------+-----------------------+
    | Kenneth J. Brody | www.hvcomputer.com | #include |
    | kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
    +-------------------------+--------------------+-----------------------+
    Don't e-mail me at: <mailto:>
     
    Kenneth Brody, Sep 18, 2007
    #17
  18. P Shetty

    Flash Gordon Guest

    runner wrote, On 18/09/07 00:56:
    > "runner" wrote:
    >>> If an OP cannot tell the difference between a couple of
    >>> concepts (because that's what he/she's looking for), it would
    >>> be harder for him/her to find the right place to ask the question.

    >
    > "Flash Gordon" wrote:
    >> So? Are you claiming you don't know the difference between the concepts
    >> and so find it hard to find the correct place as well? Someone that does
    >> not know anything about string theory might find it harder to find the
    >> right place to ask,

    >
    > Ok


    OK is not an answer to the question.

    >> it does not make that topical here either.

    >
    > I never said it does. I just dropped the "Is It Off Topic?"
    > thing because i didn't want to start another long thread
    > about what is off topic and what is not.


    You said, "Such a difference, i guess, should still belong to
    comp.lang.C." This reads like a claim that you think it is topical and
    is certainly very different from "Is It Off Topic?" which is a question.

    > Executables and object code are general concepts
    > belonging to several programming languages.
    > Loops are general concepts belonging to several
    > programming languages, but they are not off topic.


    Only the subset of possible loop constructs supported by the C language
    are topical here. Executable and object files are not topical here.
    Never heard of C interpreters?

    >> In any
    >> case, at least one person did suggest where the question would be more
    >> appropriate.

    >
    > I saw that.


    So did you not just accept it when it was pointed out to you that it is
    off topic here?
    --
    Flash Gordon
     
    Flash Gordon, Sep 18, 2007
    #18
  19. In article <-gordon.me.uk>,
    Flash Gordon <> wrote:
    >runner wrote, On 18/09/07 00:56:
    >> "runner" wrote:
    >>>> If an OP cannot tell the difference between a couple of
    >>>> concepts (because that's what he/she's looking for), it would
    >>>> be harder for him/her to find the right place to ask the question.

    >>
    >> "Flash Gordon" wrote:
    >>> So? Are you claiming you don't know the difference between the concepts
    >>> and so find it hard to find the correct place as well? Someone that does
    >>> not know anything about string theory might find it harder to find the
    >>> right place to ask,

    >>
    >> Ok

    >
    >OK is not an answer to the question.


    Rest of drivel - deleted.

    Just how long has it been since you've seen the sun or smelled a flower?

    I suggest you look into it - getting a life and all that.
     
    Kenny McCormack, Sep 18, 2007
    #19
  20. P Shetty

    runner Guest

    "Flash Gordon" <> wrote in message
    news:-gordon.me.uk...
    > runner wrote, On 18/09/07 00:56:
    > > "runner" wrote:
    > >>> If an OP cannot tell the difference between a couple of
    > >>> concepts (because that's what he/she's looking for), it would
    > >>> be harder for him/her to find the right place to ask the question.

    > >
    > > "Flash Gordon" wrote:
    > >> So? Are you claiming you don't know the difference between the concepts
    > >> and so find it hard to find the correct place as well? Someone that

    does
    > >> not know anything about string theory might find it harder to find the
    > >> right place to ask,

    > >
    > > Ok

    >
    > OK is not an answer to the question.


    You replied to your own question and i simply stated
    that your answer is a good one.

    > >> it does not make that topical here either.

    > >
    > > I never said it does. I just dropped the "Is It Off Topic?"
    > > thing because i didn't want to start another long thread
    > > about what is off topic and what is not.

    >
    > You said, "Such a difference, i guess, should still belong to
    > comp.lang.C." This reads like a claim that you think it is topical and
    > is certainly very different from "Is It Off Topic?" which is a question.


    I'm not so haughty to make any claim. I said, it "should still
    belong" and i didn't say, it "**definitely** belongs". (See also
    "i guess")

    > > Executables and object code are general concepts
    > > belonging to several programming languages.
    > > Loops are general concepts belonging to several
    > > programming languages, but they are not off topic.

    >
    > Only the subset of possible loop constructs supported by the C language
    > are topical here. Executable and object files are not topical here.


    The next time i will get an "index" of a C Language reference.

    > Never heard of C interpreters?


    What should i say !? You're striking.

    > >> In any
    > >> case, at least one person did suggest where the question would be more
    > >> appropriate.

    > >
    > > I saw that.

    >
    > So did you not just accept it when it was pointed out to you that it is
    > off topic here?


    It's not a matter of accepting.

    1) I gave my reply to the OP.
    2) It was pointed out that "Executables & Co." were off topic.
    3) I had the impression that talking about Device Drivers
    were definitely off topic but talking about "Ex & Co."
    might still be tolerated *every now and then* .

    I'm not expecting that "Ex & Co." will become topical here,
    and i just couldn't care less.
     
    runner, Sep 18, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Suresh
    Replies:
    2
    Views:
    1,085
  2. Suresh
    Replies:
    2
    Views:
    2,457
    Alan Balmer
    Jul 14, 2004
  3. nbhalala

    Write Linux Device Driver

    nbhalala, Aug 7, 2004, in forum: C Programming
    Replies:
    2
    Views:
    375
    lxrocks
    Aug 10, 2004
  4. wilson
    Replies:
    3
    Views:
    952
    wilson
    Aug 10, 2004
  5. Pravin Shetty

    Question on Linux Device Driver ?

    Pravin Shetty, Jan 5, 2005, in forum: C Programming
    Replies:
    1
    Views:
    314
    Jack Klein
    Jan 5, 2005
Loading...

Share This Page