[PATCH] sectiongroup support
kledzik at apple.com
Mon Mar 17 16:24:36 PDT 2014
On Mar 17, 2014, at 3:48 PM, Shankar Easwaran <shankare at codeaurora.org> wrote:
>> I think the solution:
>> 1) keep the existing canonical form for an atom graph that Passes process
>> 2) make the ELF Writer smart that when it writes relocatable object files, to synthesize undefined symbols for references into group children
>> 3) Have the YAML Reader be dumb and not synthesize any undefines. Test cases for groups that want undefines will need to explicitly have them in the yaml. This also enables you to write test cases that test the error case where an indirection though an undefine is not used.
> The below steps as in the command line would not work though.
> lld -flavor gnu -target x86_64 group.o --output-filetype=yaml --noinhibit-exec
> (Input file is processed by the ELF reader, convert the read files to YAML files, re-read the files from YAML back into atoms)
> As the YAML reader wouldnt synthesize undefined atoms ? Its like a chicken-egg problem.
Think of the YAML Reader and Writer as dumb. They just convert in-memory-objects <-> yaml. Undefined are never synthesized (point 3 above). If you want to write test cases for groups in yaml, you’ll need to explicitly add the UndefineAtom in the yaml file.
> I think the Native writer also would have this same issue, right ?
Same thing native Reader and Writer are just in-memory-objects <-> binary.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits