program compiled on Linux - Linux

This is a discussion on program compiled on Linux - Linux ; What is a file filename(.o) that is executed by ./filename represented for ? What is inside itself ? Thanks...

+ Reply to Thread
Results 1 to 7 of 7

Thread: program compiled on Linux

  1. program compiled on Linux

    What is a file filename(.o) that is executed by ./filename represented
    for ? What is inside itself ? Thanks


  2. Re: program compiled on Linux

    On 19 Dec 2006 16:03:56 -0800
    "Linux man" wrote:

    > What is a file filename(.o) that is executed by ./filename represented
    > for ? What is inside itself ? Thanks


    I really didn't understand what you just asked. But in case you want to
    know the binary format on linux, it's generally ELF. Althought there
    are other formats supported.

  3. Re: program compiled on Linux


    Rafael Almeida wrote:
    > On 19 Dec 2006 16:03:56 -0800
    > "Linux man" wrote:
    >
    > > What is a file filename(.o) that is executed by ./filename represented
    > > for ? What is inside itself ? Thanks

    >
    > I really didn't understand what you just asked. But in case you want to
    > know the binary format on linux, it's generally ELF. Althought there
    > are other formats supported.


    is there a way to port it to windows ?


  4. Re: program compiled on Linux

    Linux man wrote:
    > What is a file filename(.o) that is executed by ./filename represented
    > for ? What is inside itself ? Thanks
    >


    The ".o"-File is an intermediate binary object file not yet linked into
    a runnable executable. There is a 1:1 relationship between a .o file and
    a source file. A .o file cannot be executed directly, as external
    references are not yet resolved and the memory locations of the (code
    and data) objects within the file are not yet determined.

    The linker (ld) takes one or more .o files and combines them into a
    runnable executable. This executable may then requite "shared object"
    files (".so") to actually run. The latter are the Linux equivalent of
    DLLs (duck and cover ;-).

    hTH,

    Josef
    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett


  5. Re: program compiled on Linux

    On 2006-12-20, Linux man wrote:
    >
    > Rafael Almeida wrote:
    >> On 19 Dec 2006 16:03:56 -0800
    >> "Linux man" wrote:
    >>
    >> > What is a file filename(.o) that is executed by ./filename represented
    >> > for ? What is inside itself ? Thanks

    >>
    >> I really didn't understand what you just asked. But in case you want to
    >> know the binary format on linux, it's generally ELF. Althought there
    >> are other formats supported.

    >
    > is there a way to port it to windows ?


    Yes.

    1) Get the source code.

    2) Fix it up so that it compiles under Windows.

    3) Compile it under Windows.

    --
    Grant Edwards grante Yow! .. does your DRESSING
    at ROOM have enough ASPARAGUS?
    visi.com

  6. Re: program compiled on Linux

    On 2006-12-20, Josef Moellers wrote:

    >> What is a file filename(.o) that is executed by ./filename
    >> represented for ? What is inside itself ? Thanks

    >
    > The ".o"-File is an intermediate binary object file not yet
    > linked into a runnable executable. There is a 1:1 relationship
    > between a .o file and a source file.


    Usually that's true. However, you can link multiple .o files
    together to create a single, larget .o file if you want. In
    that case there is no corresponding source file for the
    resulting .o file.

    > A .o file cannot be executed directly, as external references
    > are not yet resolved and the memory locations of the (code
    > and data) objects within the file are not yet determined.


    Usually that's true. However, you can create an executable and
    call it something.o if you want. There's nothing special about
    ".o" it's just two characters at the end of a filename.

    --
    Grant Edwards grante Yow! Dehydrated EGGS are
    at STREWN across ROULETTE
    visi.com TABLES...

  7. Re: program compiled on Linux

    Hi,

    >>
    >> I really didn't understand what you just asked. But in case you want to
    >> know the binary format on linux, it's generally ELF. Althought there
    >> are other formats supported.

    >
    > is there a way to port it to windows ?


    Probably the easiest way to port an application to Windoze is Cygwin, but
    they will need to be recompiled. I haven't used it in a while as I dumped
    'doze from all my machines 4 or 5 years ago, but it can be found at:

    http://www.cygwin.com/

    Cheers,
    John McCallum


+ Reply to Thread