[PATCH][lld] Begin AArch64 support
Tim Northover
t.p.northover at gmail.com
Mon May 6 10:47:26 PDT 2013
Hi Shankar,
> a) I dont see any relocations being handled
That was intentional. I was going for a completely minimal initial
patch (just enough to compile lld) followed by incremental development
(which I haven't actually done yet). I can keep it in a separate
branch until I've got something reasonably functional if that would be
preferred?
> b) How are you testing it, if you dont have any relocations added ?
I suspect only the tests actually included (plus the one you've given
me hints for) would actually work at the moment. I certainly wouldn't
expect it to link even the most trivial C program under any
circumstances.
> The way to test would be :-
>
> lld -flavor gnu -target [x86_64|hexagon|x86] ....
This was what gave me the linker script error, if I'm interpreting you
correctly:
$ cat simple.s
.text
.global _start
.type _start, at function
_start:
callq bar
ret
$ clang simple.s -c- -o- \
| lld -flavor gnu -target x86_64 emit-yaml -r - \
| lld -flavor gnu -target x86_64 -
Failed to read file: -: Error parsing linker script
Everything except that last command is just to get an obviously
correct YAML file containing (in this case) an R_X86_64_PC32. The idea
is to make sure that last command can parse "R_X86_64_PC32" as a
string and knows what to do with it, at least as far as constructing
an internal representation.
> For your case you need to handle aarch64 seperately (see lld-core.cpp).
To me it looks like Nick Kledzik's refactoring last month made
lld-core dead code. It's not added in CMakeLists.txt any more.
The replacement (lib/Driver/CoreDriver.cpp) appears to be completely
target-agnostic. Is that likely just because no-one has got around to
adding target-specific intelligence to it yet, or is it a design
decision?
Thanks for your help.
Tim.
More information about the llvm-commits
mailing list