[PATCH] sectiongroup support
shankare at codeaurora.org
Mon Mar 17 16:34:51 PDT 2014
On 3/17/2014 6:24 PM, Nick Kledzik wrote:
> On Mar 17, 2014, at 3:48 PM, Shankar Easwaran <shankare at codeaurora.org
> <mailto:shankare at codeaurora.org>> wrote:
>>> I think the solution:
>>> 1) keep the existing canonical form for an atom graph that Passes
>>> 2) make the ELF Writer smart that when it writes relocatable object
>>> files, to synthesize undefined symbols for references into group
>>> 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
>> (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.
You are right that if the YAML reader and writer is used for testing, as
well as the Native reader/writer. The problem will appear when the
linker emittted YAML/Native file (after the resolver is complete) is
used in a separate link, isnt it ?
Is this a usecase that we would not be supporting ?
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits