[LLVMdev] [lld] Linker script findings.

Sean Silva silvas at purdue.edu
Wed Jan 9 12:29:39 PST 2013

On Wed, Jan 9, 2013 at 9:13 AM,  <shankare at codeaurora.org> wrote:
> I dont think any other format has the functionality of sections and
> segments with segment and section permissions etc.
> Are you planning to mimic 1-1 lld to ld linker script functionality ?

No, there's lots of arcane things that GNU ld has (like compatibility
with a completely different linker script language). Pragmatically it
makes sense to at least support enough to link Linux.

> Do you by any chance have a proposal of how the lld linker script would
> look if there is a difference b/w ld and lld linker scripts ?

I don't see any reason to support anything except a strict subset of
ld's language. What kind of difference are you thinking of?

> Maybe the first version could be just ELF centric.

The consensus in this thread seems to be that it should be in the
frontend. Nick pointed out that since linker scripts can define
symbols, they need to be handled before the writer; I don't see any
way to avoid that. Could you elaborate on the concrete reasons why you
think it should be in the ELF backend?

-- Sean Silva

More information about the llvm-dev mailing list