Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, I recently started working on Linux system. Sometime get some crazy doubts, tried to google it. But sometime I get answer sometime I don’t. So though of joining ...
  1. #1
    Just Joined!
    Join Date
    Jun 2011
    Posts
    1

    Question of a.out

    Hi All,

    I recently started working on Linux system. Sometime get some crazy doubts, tried to google it. But sometime I get answer sometime I don’t. So though of joining here; so that can get more updates and to ask some question to experts .

    My first question, say suppose I wrote a program (which has a global variable) and I compiled it. I will get a.out file. I want to know who is giving input as to place this global variable at this X location and to place text at this location.

    Thanks,
    Keerthi.

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    The last step of compiling a program is to run the linker, which handles referencing all symbols and figuring out addresses. I don't know exactly how it all works (and it's probably too complicated to describe here in any case), but the linker that GCC uses is called "ld".

    http://en.wikipedia.org/wiki/Linker_(computing)
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...