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
Loading
Please register or sign in to comment