This is an archive of the discontinued LLVM Phabricator instance.

[LLD] Improve handling of AT> linker script commands
ClosedPublic

Authored by kschwarz on Jul 31 2018, 4:24 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

kschwarz created this revision.Jul 31 2018, 4:24 AM

Seems several independent bugs are fixed here. I would suggest splitting this patch to independent reviews.

(Also, an uploaded patch has no context. Please include it next time (https://llvm.org/docs/Phabricator.html#id3).)

ELF/LinkerScript.cpp
120 ↗(On Diff #158215)

Can you split this change and the corresponding test case (at8.test) to the different patch?

test/ELF/linkerscript/at8.test
10 ↗(On Diff #158215)

Do you really need an alias?

13 ↗(On Diff #158215)

Please remove excessive empty lines here and below.

kschwarz marked 2 inline comments as done.Jul 31 2018, 7:30 AM
kschwarz added inline comments.
ELF/LinkerScript.cpp
120 ↗(On Diff #158215)
test/ELF/linkerscript/at8.test
10 ↗(On Diff #158215)

I used the REGION_ALIAS feature to illustrate how this scenario might occur in real world linker scripts.

kschwarz updated this revision to Diff 158261.Jul 31 2018, 7:32 AM
kschwarz edited the summary of this revision. (Show Details)

Split one of the fixes into its own patch.

Can this be split into 2 different patches?

kschwarz updated this revision to Diff 158476.Aug 1 2018, 1:02 AM
kschwarz edited the summary of this revision. (Show Details)

Split patch into seperate patches (https://reviews.llvm.org/D50133)

grimar added a comment.Aug 1 2018, 3:47 AM

I think it is fine (with minor nit). I would wait for the landing of the D50133 first though. It might affect the code of this patch perhaps I think.

ELF/Writer.cpp
1826 ↗(On Diff #158476)

The comment above needs an update.

grimar accepted this revision.Aug 1 2018, 11:04 PM

On the second look, this change is more independent from D50133 than I thought initially.
So, LGTM with the comment updated.

This revision is now accepted and ready to land.Aug 1 2018, 11:04 PM
kschwarz updated this revision to Diff 158688.Aug 2 2018, 12:04 AM

Update comment

do you have a commit access?

No, could you commit for me? Thanks!

This revision was automatically updated to reflect the committed changes.
ruiu added a comment.Aug 2 2018, 3:34 PM

Could you give me a few days to review code since we are working in different time zones?

lld/trunk/ELF/Writer.cpp
1823

It feels to me that the condition is now too complicated. The code for the linker script is basically too complicated, and I don't like to add too much complexity.

grimar added a comment.Aug 3 2018, 2:32 AM

Could you give me a few days to review code since we are working in different time zones?

Could you comment D49374 and D49136, please. If the issue is different time zones.