Skip to content

Commit

Permalink
Handle arbitrary expressions in DATA_SEGMENT_RELRO_END.
Browse files Browse the repository at this point in the history
llvm-svn: 281521
  • Loading branch information
espindola committed Sep 14, 2016
1 parent 01f1666 commit 97bdc72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lld/ELF/LinkerScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ Expr ScriptParser::readPrimary() {
// the next page boundary for simplicity.
if (Tok == "DATA_SEGMENT_RELRO_END") {
expect("(");
next();
readExpr();
expect(",");
readExpr();
expect(")");
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/linkerscript/data-segment-relro.s
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# RUN: . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); \
# RUN: .dynamic : { *(.dynamic) } \
# RUN: .got : { *(.got) } \
# RUN: . = DATA_SEGMENT_RELRO_END (24, .); \
# RUN: . = DATA_SEGMENT_RELRO_END (1 ? 24 : 0, .); \
# RUN: .got.plt : { *(.got.plt) } \
# RUN: .data : { *(.data) } \
# RUN: .bss : { *(.bss) } \
Expand Down

0 comments on commit 97bdc72

Please sign in to comment.