[PATCH] D38846: [ELF] - Linkerscript: Fix issues with SUBALIGN.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 08:17:58 PDT 2017


grimar created this revision.
Herald added a subscriber: emaste.

This is PR34886.
We have 2 issues with SUBALIGN command:

1. Expression must be constant, so should not allow using Dot.
2. If expression result is zero we assert.

Patch fixes both. I checked that bfd allows SUBALIGN(0),
so I think we should do the same. Fix here is consistent with other places
in LLD.


https://reviews.llvm.org/D38846

Files:
  ELF/LinkerScript.cpp
  ELF/LinkerScript.h
  ELF/ScriptLexer.h
  ELF/ScriptParser.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38846.118791.patch
Type: text/x-patch
Size: 3951 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171012/9c0bb263/attachment.bin>


More information about the llvm-commits mailing list