[LLVMdev] [lld] need a way to store the original path for atoms

Nick Kledzik kledzik at apple.com
Wed Nov 19 13:09:17 PST 2014


On Nov 19, 2014, at 11:26 AM, Shankar Easwaran <shankarke at gmail.com> wrote:

> Hi Nick,
> 
> I need the original path of the files, from where the atoms were parsed.
> 
> The path for the atoms are completely useless after the round trip pass.
> 
> This is needed to support linker scripts with the Gnu flavor. I think there are more uses too like diagnostics (relocation overflows etc)
Can you give some examples.   Can whatever the linker scripts needs done, be done in a Pass before the round tripping?

The RoundTripping passes are a test suite feature.  They are like running "ld -r” first, then linking that one merged .o file.  I’m guessing the linker script won’t work on that either (since the original .o filenames are lost).

Maybe we just need a —no-round-trip linker option for the test cases that need to exercise that part of linker scripts? Or unset LLD_RUN_ROUNDTRIP_TEST in the test case.

-Nick

> 
> I was planning to add a patch so that the native writer, stores the original path for atoms
> 
> Another way to fix the problem is to I can also have a lld core reference that points to the path information(archive files will need to record the member and the path of the archive file).






More information about the llvm-dev mailing list