This is an archive of the discontinued LLVM Phabricator instance.

Add support for Hexagon
AbandonedPublic

Authored by sidneym on May 29 2018, 7:51 AM.

Details

Summary

This patch adds initial support for the hexagon architecture. It will handle the requirements needed to link the Linux kernel.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

sidneym created this revision.May 29 2018, 7:51 AM
ruiu added a comment.May 29 2018, 9:58 AM

Hi Sid,

Thank you for working on this! However, I'm not very happy to see a single large patch that adds large amount of code at once. It looks like the test doesn't test all the features and relocations you added in this patch, and it looks like the code is written in a pretty different way than those for other targets. It needs to be updated so that it is written in the same style as others. Discussing based on this large patch is perhaps not desirable.

What I'd like to see as a starter is the code that can only link an empty program that doesn't do anything. Could you reduce this patch to that absolute minimal one? After that we can start discussing details.

The two large files, HexagonDepMask and HexagonRelocationInfo could live in llvm/lib/Target/Hexagon. I was kind of on the fence about the location, but since they would only be used by the linker in the public tree I put them with lld.

I can truncate the number of supported relocations to those required for basic static linking.

ruiu added a comment.May 29 2018, 10:30 AM

I can truncate the number of supported relocations to those required for basic static linking.

Please do. In addition to truncating the code, please rewrite code to fill the discrepancies between your code and other files in the same directory. We generally do not define a large table like that, for example.

Also please pay attention to coding style. E.g. trailing empty lines, C/C++-style comment discrepancy, etc.

sidneym abandoned this revision.Jun 5 2018, 8:16 AM
ruiu added a comment.Jun 5 2018, 8:28 AM

Do you have a plan to work on this, or did you just abandon your port?

I just pushed a smaller version

ELF/HexagonDepDefines.h