[lld] r190608 - [lld][LayoutPass] Order the atoms that are in the same chain

Shankar Easwaran shankare at codeaurora.org
Fri Sep 13 16:01:56 PDT 2013


On 9/13/2013 5:47 PM, Rui Ueyama wrote:
> This patch seems to break IdataPass in COFF writer. The COFF writer creates
> atoms for DLL import table in the pass. Because the atoms created in the
> pass do not really belong to any input file, the linker uses MutableFile
> representing the linking result as a dummy value of the file for the atoms.
> It did work until this patch.
The patch solves the problem in many ways. Atoms only in their chain are 
ordered, which is what we want to do.

> The MutableFile did not have input ordinal value, so it now fails with the
> assertion at include/lld/Core/File.h:72 checking _ordinal != UINT64_MAX in
> the layout pass.
>
> I think there are many ways to fix this. One way would be to create another
> dummy input file and use it for the atoms created by the IdataPass. It
> should work, but I don't think that's a good way because the dummy file is
> really dummy and does not do anything useful. It feels like the restriction
> that atoms must have associated input files is too strict.
We use SimpleFile at all places.
> So I'd want to make _file field optional for the atom. What do you guys
> think?
I dont think we do this.

Thanks

Shankar Easwaran

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation




More information about the llvm-commits mailing list