[LLVMdev] [lld] Atom object model refactoring.

Marshall Clow mclow.lists at gmail.com
Wed Jul 18 15:58:38 PDT 2012


On Jul 18, 2012, at 3:55 PM, Nick Kledzik wrote:
> On Jul 18, 2012, at 3:41 PM, Clow, Marshall wrote:
>> On Jul 18, 2012, at 2:34 PM, Nick Kledzik wrote:
>>> The four Atom kinds each have very different attributes and are used 
>>> differently,  That is why I broke them out into separate lists.  
>> 
>> [ Just trying to understand here. ]
>> 
>> So, what I'm hearing is that there are four different kinds of Atoms.
>> No more, no less - matching the enum in Atom.h.
>> Is that correct?
> Stated that way, it makes the "four" seem arbitrary.  It makes more sense once 
> you see that the four kinds are:
> 
> 1) DefinedAtom
>     95% of all atoms.  This is a chunk of code or data
> 2) UndefinedAtom
>     This is a place holder in object files for a reference to some atom outside the translation unit.
>     During core linking it is usually replaced by (coalesced into) another Atom.
> 3) SharedLibraryAtom
>      If a required symbol name turns out to be defined in a dynamic shared library (and not some
>      object file).  A SharedLibraryAtom is the placeholder Atom used to represent that fact.  
>      It is similar to an UndefinedAtom, but it also tracks information about the associated shared library.
> 4) AbsoluteAtom
>     This is for embedded support where some stuff is implemented in ROM at some fixed address.  This
>      atom has no content.  It is just an address that the Writer needs to fixup any references to point to.
> 
>> 
>> The readers generate a list of atoms from some object format.
>> The linker does a bunch of graph stuff on the atoms.
>> The writers get a list of (interconnected) atoms, and write an executable from that.
>> 
>> Am I missing something?
> That is the high level summary.  


Nick --

I've got no problem with the number "four" ;-)

I just want to make sure that I'm understanding what's going on - so I can make intelligent commentary.
thanks for the elaboration.

Can I paste that description into design.rst?

-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists at gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki





More information about the llvm-dev mailing list