[lld] Atom and its unwind information

Hi Nick,

I was looking at ld64 source code and the atom deals with additional information such as

a) UnwindInfo

If you are using dwarf unwind info, the dwarf FDE is just another atom (in .eh_frame section). We'll need a special reference in function atoms to their FDE atom, so that they get dead stripped or coalesced as a group (that is what ld64 does).

Do you mean typeCode atoms here ? Yes, eh frames are used in ELF. The eh_frame sections have to be first read to make this happen, so that function atoms may point to their respective FDE block.

b) LineInfo

This was an experiment in ld64. At one point we thought it might be nice when erroring out with undefined symbol to give the source file and line number of each use of the undefined symbol. But that never panned out.

This might be a good thing to have it in lld too, would be easy to debug things.

My current plan for this is to use the File reference each Atom has to handle printing location info for errors. For example symbols from linker scripts should get caret diags, while object files should try to use debug info to give caret diags on the original source.

- Michael Spencer