aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenAction.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-02-17 16:26:13 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-02-17 16:26:13 +0000
commit679828ff920b6f879b21a30b3e78a519a07f147b (patch)
tree90f5c949afd21db3f65e774d87c4594ae0c553b2 /clang/lib/CodeGen/CodeGenAction.cpp
parent28096200a8f834373037234a756c144f876a3342 (diff)
downloadllvm-679828ff920b6f879b21a30b3e78a519a07f147b.zip
llvm-679828ff920b6f879b21a30b3e78a519a07f147b.tar.gz
llvm-679828ff920b6f879b21a30b3e78a519a07f147b.tar.bz2
Diagnose another case of the location counter moving backwards.
This case should be possible to handle, but it is hard: * In order to create program headers correctly, we have to scan the sections in the order they are in the file. * To find that order, we have to "execute" the linker script. * The linker script can contain SIZEOF_HEADERS. So to support this we have to start with a guess of how many headers we need (3), run the linker script and try to create the program headers. If it turns out we need more headers, we run the script again with a larger SIZEOF_HEADERS. Also, running the linker script depends on knowing the size of the sections, so we have to finalize them. But creating the program headers can change the value stored in some sections, so we have to split size finalization and content finalization. Looks like the last part is also needed for range extension thunks, so we might support this at some point. For now just report an error instead of producing broken files. llvm-svn: 295458
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
0 files changed, 0 insertions, 0 deletions