[PATCH] [lld] ELF: Initial implementation for ARM static linking

Denis Protivensky dprotivensky at accesssoftek.com
Wed Nov 26 06:42:41 PST 2014


Will,

> Do you know what functionality is missing to enable that?

Partially. I have a piece of changes that are useful, just didn't want
to mix them up into one big patch.
There are also broken things that I'm still working on.
Should I somewhere post it? In the TODO?


> Is it possible to use ELFYAML for the tests similarly to e.g. the MIPS
> backend? I recently posted a patch to add ARM support to ELFYAML.

Let me check. I didn't know about that.


> 1. GNU ld seems to use "armelf_linux_eabi" for the emulation name
> rather than "armlinux"

Okay, will see how I can change it.


> 2. One comment reference to x86-64 that should be ARM

Wow, I copy'n'pasted it from AArch64, and there's the same miss.
I might change this later in a separate commit/patch.


> 3. It would be useful to add a TODO list that lists all the known
> unimplemented parts

Good.

- Denis.
________________________________________
From: Will Newton [will.newton at linaro.org]
Sent: Wednesday, November 26, 2014 5:01 PM
To: Denis Protivensky
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] [lld] ELF: Initial implementation for ARM static linking

On 26 November 2014 at 12:17, Denis Protivensky
<dprotivensky at accesssoftek.com> wrote:
> Hi,
>
> The patch contains the skeleton code for ELF binary generation for ARM platform.
> The code is "almost" able to statically link the simplest case of void main() { return 0; } sample.

Do you know what functionality is missing to enable that?

> Added all needed relocations, GOT and TLS handling.
> Some of these may still be improper which causes segfaults.
>
> NOTE: the tests are absent because there's no simple way to generate diff for binary files (which are used in tests by the linker).

Is it possible to use ELFYAML for the tests similarly to e.g. the MIPS
backend? I recently posted a patch to add ARM support to ELFYAML.

A couple of things I noticed:

1. GNU ld seems to use "armelf_linux_eabi" for the emulation name
rather than "armlinux"
2. One comment reference to x86-64 that should be ARM
3. It would be useful to add a TODO list that lists all the known
unimplemented parts

Otherwise this looks like a good start!

--
Will Newton
Toolchain Working Group, Linaro




More information about the llvm-commits mailing list