[LLVMdev] [lld] Linker script findings.

Sean Silva silvas at purdue.edu
Wed Jan 9 18:49:18 PST 2013


On Wed, Jan 9, 2013 at 8:47 PM, Nick Kledzik <kledzik at apple.com> wrote:
> We need to be careful about what we mean by "frontend" and "backend"
> of lld.

Yeah, that terminology was really vague. I identify "frontend" with
the driver (GNU ld, link.exe, ld64, etc) and "backend" with
ReaderWriter (i.e. roughly the object file formats).

> The Writer (backend?) actually gets a chance to contribute
> atoms along with the Reader atoms which are fed to the Resolver.

Could you elaborate on this? My understanding is that ReaderWriter is
supposed to be basically a toolkit for emitting the object files
("mechanism"), while the different drivers use those APIs (along with
the Atom core linking model "mechanism") to emulate their respective
linkers (the "policy").

> So the linker script code could live in WriterELF and contribute atoms
> for symbols defined by a linker script.
>
> That being said, some of the functionality of linker scripts is done via
> command line options on other platforms, so we want to share common
> functionality were possible. The linker script parsing may wind up
> being a thin layer (in WriterELF) on top of some shared functionality.

Ok.

-- Sean Silva



More information about the llvm-dev mailing list