This is an archive of the discontinued LLVM Phabricator instance.

[lld] Make ALIGN work with -r in linker scripts
ClosedPublic

Authored by kettenis on May 14 2018, 10:57 AM.

Details

Summary

Make ALIGN work in linker scripts used with the -r option. This works in GNU ld (ld.bfd) and is used to generate the "random gap" object for linking the OpenBSD kernel.

Diff Detail

Event Timeline

kettenis created this revision.May 14 2018, 10:57 AM
ruiu accepted this revision.May 14 2018, 3:45 PM

LGTM

This revision is now accepted and ready to land.May 14 2018, 3:45 PM
jhenderson added inline comments.May 15 2018, 1:21 AM
test/ELF/linkerscript/align.s
45

Nit: modificator -> modifier or expression

grimar requested changes to this revision.May 15 2018, 2:13 AM
grimar added inline comments.
test/ELF/linkerscript/align.s
51

This script has no differences from the script right above on lines 35-41.
Hence you do not need it. And actually, you do not use it.

This revision now requires changes to proceed.May 15 2018, 2:13 AM
kettenis added inline comments.May 15 2018, 4:27 AM
test/ELF/linkerscript/align.s
45

What can I say; just copy and pasted it from the existing example. Want me to cange that one too?

51

Right. I'll remove that one and change the command slightly such that it doesn't overwrite the output of the previous test.

jhenderson added inline comments.May 15 2018, 5:01 AM
test/ELF/linkerscript/align.s
45

Yes, please. "Modificator" isn't a word.

kettenis updated this revision to Diff 146910.May 15 2018, 1:31 PM

New diff that fixes the regression test.

grimar accepted this revision.May 16 2018, 12:25 AM

LGTM

This revision is now accepted and ready to land.May 16 2018, 12:25 AM

Would one of you be so kind to commit this for me?

This revision was automatically updated to reflect the committed changes.