diff options
| author | George Rimar <grimar@accesssoftek.com> | 2018-04-25 11:16:31 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2018-04-25 11:16:31 +0000 |
| commit | d30a78b3fede801cf6b7054851d4daa041103948 (patch) | |
| tree | 6bd2ab8f06c2612a7973f2e69b41ad49cb7b82b1 /llvm/lib/CodeGen/MachineInstr.cpp | |
| parent | 6a82e96ed90eafb1c8520be92d0a67f953c1fa7d (diff) | |
| download | llvm-d30a78b3fede801cf6b7054851d4daa041103948.zip llvm-d30a78b3fede801cf6b7054851d4daa041103948.tar.gz llvm-d30a78b3fede801cf6b7054851d4daa041103948.tar.bz2 | |
[ELF] - Eliminate the AssertCommand.
Currently, LLD supports ASSERT as a separate command.
We support two forms now.
Assign expression-form: . = ASSERT(0x100)
(old GNU ld required it and some scripts in the wild are still using
something like . = ASSERT((_end - _text <= (512 * 1024 * 1024)), "kernel image bigger than KERNEL_IMAGE_SIZE");
Nowadays above is not a mandatory form and command-like form is commonly used:
ASSERT(<expr>, "text);
The return value of the ASSERT is Dot. That was implemented in D30171.
It looks like (2) is just a short version of (1) then.
GNU ld does *not* list ASSERT as a SECTIONS command:
https://sourceware.org/binutils/docs/ld/SECTIONS.html#SECTIONS
Given above we probably can change ASSERT to be an assignment to Dot.
That makes the rest of the code much simpler. Patch do that.
Differential revision: https://reviews.llvm.org/D45434
llvm-svn: 330814
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions
