Files
clang-p2996/lld/test/LinkerScript/memory-missing-length.test
Meador Inge 2ce1ea86d0 LinkerScript: Add parsing of the MEMORY command
This patch implements parsing of the GNU ld MEMORY command [1].
The command and the memory block definitions are parsed as
specified (including the slightly strange "o" and "l" keywords).
Evaluation will be added at a later point in time.

[1] https://sourceware.org/binutils/docs-2.25/ld/MEMORY.html

llvm-svn: 231928
2015-03-11 15:34:44 +00:00

30 lines
509 B
Plaintext

/*
RUN: linker-script-test %s 2> %t | FileCheck %s
RUN: FileCheck -input-file %t -check-prefix=CHECK-ERR %s
*/
MEMORY
{
ram (rwx) : ORIGIN = 0x20000000,
}
/*
CHECK-ERR: [[@LINE-2]]:1: error: expected LENGTH
CHECK-ERR-NEXT: {{^}}}
CHECK-ERR-NEXT: {{^\^}}
*/
/*
CHECK: kw_memory: MEMORY
CHECK: l_brace: {
CHECK: identifier: ram
CHECK: l_paren: (
CHECK: identifier: rwx
CHECK: r_paren: )
CHECK: colon: :
CHECK: kw_origin: ORIGIN
CHECK: equal: =
CHECK: number: 0x20000000
CHECK: r_brace: }
CHECK: eof:
*/