<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 3/17/2014 6:43 PM, Nick Kledzik
      wrote:<br>
    </div>
    <blockquote
      cite="mid:E71D76FD-BD3F-4CED-B474-4BB863F56BD9@apple.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <br>
      <div>
        <div>On Mar 17, 2014, at 4:34 PM, Shankar Easwaran <<a
            moz-do-not-send="true" href="mailto:shankare@codeaurora.org">shankare@codeaurora.org</a>>
          wrote:</div>
        <br class="Apple-interchange-newline">
        <blockquote type="cite">
          <meta content="text/html; charset=windows-1252"
            http-equiv="Content-Type">
          <div text="#000000" bgcolor="#FFFFFF">
            <div class="moz-cite-prefix">On 3/17/2014 6:24 PM, Nick
              Kledzik wrote:<br>
            </div>
            <blockquote
              cite="mid:2EC57BE8-706A-4B8F-8DA6-6D93F58A5287@apple.com"
              type="cite">
              <meta http-equiv="Content-Type" content="text/html;
                charset=windows-1252">
              <br>
              <div>
                <div>On Mar 17, 2014, at 3:48 PM, Shankar Easwaran <<a
                    moz-do-not-send="true"
                    href="mailto:shankare@codeaurora.org">shankare@codeaurora.org</a>>

                  wrote:</div>
                <br class="Apple-interchange-newline">
                <blockquote type="cite">
                  <div text="#000000" bgcolor="#FFFFFF">
                    <blockquote
                      cite="mid:AF0C5235-C9B3-4E27-8640-053EE3D7015E@apple.com"
                      type="cite" style="font-family: Helvetica;
                      font-size: 12px; font-style: normal; font-variant:
                      normal; font-weight: normal; letter-spacing:
                      normal; line-height: normal; orphans: auto;
                      text-align: start; text-indent: 0px;
                      text-transform: none; white-space: normal; widows:
                      auto; word-spacing: 0px;
                      -webkit-text-stroke-width: 0px;">
                      <div>I think the solution:</div>
                      <div>1) keep the existing canonical form for an
                        atom graph that Passes process</div>
                      <div>2) make the ELF Writer smart that when it
                        writes relocatable object files, to synthesize
                        undefined symbols for references into group
                        children</div>
                      <div>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.</div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                    </blockquote>
                    <span style="font-family: Helvetica; font-size:
                      12px; font-style: normal; font-variant: normal;
                      font-weight: normal; letter-spacing: normal;
                      line-height: normal; orphans: auto; text-align:
                      start; text-indent: 0px; text-transform: none;
                      white-space: normal; widows: auto; word-spacing:
                      0px; -webkit-text-stroke-width: 0px;
                      background-color: rgb(255, 255, 255); float: none;
                      display: inline !important;">The below steps as in
                      the command line would not work though.</span><br
                      style="font-family: Helvetica; font-size: 12px;
                      font-style: normal; font-variant: normal;
                      font-weight: normal; letter-spacing: normal;
                      line-height: normal; orphans: auto; text-align:
                      start; text-indent: 0px; text-transform: none;
                      white-space: normal; widows: auto; word-spacing:
                      0px; -webkit-text-stroke-width: 0px;">
                    <br style="font-family: Helvetica; font-size: 12px;
                      font-style: normal; font-variant: normal;
                      font-weight: normal; letter-spacing: normal;
                      line-height: normal; orphans: auto; text-align:
                      start; text-indent: 0px; text-transform: none;
                      white-space: normal; widows: auto; word-spacing:
                      0px; -webkit-text-stroke-width: 0px;">
                    <span style="font-family: Helvetica; font-size:
                      12px; font-style: normal; font-variant: normal;
                      font-weight: normal; letter-spacing: normal;
                      line-height: normal; orphans: auto; text-align:
                      start; text-indent: 0px; text-transform: none;
                      white-space: normal; widows: auto; word-spacing:
                      0px; -webkit-text-stroke-width: 0px;
                      background-color: rgb(255, 255, 255); float: none;
                      display: inline !important;">lld -flavor gnu
                      -target x86_64 group.o --output-filetype=yaml
                      --noinhibit-exec<span
                        class="Apple-converted-space"> </span></span><br
                      style="font-family: Helvetica; font-size: 12px;
                      font-style: normal; font-variant: normal;
                      font-weight: normal; letter-spacing: normal;
                      line-height: normal; orphans: auto; text-align:
                      start; text-indent: 0px; text-transform: none;
                      white-space: normal; widows: auto; word-spacing:
                      0px; -webkit-text-stroke-width: 0px;">
                    <br style="font-family: Helvetica; font-size: 12px;
                      font-style: normal; font-variant: normal;
                      font-weight: normal; letter-spacing: normal;
                      line-height: normal; orphans: auto; text-align:
                      start; text-indent: 0px; text-transform: none;
                      white-space: normal; widows: auto; word-spacing:
                      0px; -webkit-text-stroke-width: 0px;">
                    <span style="font-family: Helvetica; font-size:
                      12px; font-style: normal; font-variant: normal;
                      font-weight: normal; letter-spacing: normal;
                      line-height: normal; orphans: auto; text-align:
                      start; text-indent: 0px; text-transform: none;
                      white-space: normal; widows: auto; word-spacing:
                      0px; -webkit-text-stroke-width: 0px;
                      background-color: rgb(255, 255, 255); float: none;
                      display: inline !important;">(Input file is
                      processed by the ELF reader, convert the read
                      files to YAML files, re-read the files from YAML
                      back into atoms)</span><br style="font-family:
                      Helvetica; font-size: 12px; font-style: normal;
                      font-variant: normal; font-weight: normal;
                      letter-spacing: normal; line-height: normal;
                      orphans: auto; text-align: start; text-indent:
                      0px; text-transform: none; white-space: normal;
                      widows: auto; word-spacing: 0px;
                      -webkit-text-stroke-width: 0px;">
                    <br style="font-family: Helvetica; font-size: 12px;
                      font-style: normal; font-variant: normal;
                      font-weight: normal; letter-spacing: normal;
                      line-height: normal; orphans: auto; text-align:
                      start; text-indent: 0px; text-transform: none;
                      white-space: normal; widows: auto; word-spacing:
                      0px; -webkit-text-stroke-width: 0px;">
                    <span style="font-family: Helvetica; font-size:
                      12px; font-style: normal; font-variant: normal;
                      font-weight: normal; letter-spacing: normal;
                      line-height: normal; orphans: auto; text-align:
                      start; text-indent: 0px; text-transform: none;
                      white-space: normal; widows: auto; word-spacing:
                      0px; -webkit-text-stroke-width: 0px;
                      background-color: rgb(255, 255, 255); float: none;
                      display: inline !important;">As the YAML reader
                      wouldnt synthesize undefined atoms ? Its like a
                      chicken-egg problem.</span><br style="font-family:
                      Helvetica; font-size: 12px; font-style: normal;
                      font-variant: normal; font-weight: normal;
                      letter-spacing: normal; line-height: normal;
                      orphans: auto; text-align: start; text-indent:
                      0px; text-transform: none; white-space: normal;
                      widows: auto; word-spacing: 0px;
                      -webkit-text-stroke-width: 0px;">
                  </div>
                </blockquote>
                <div>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.  <br>
                </div>
              </div>
            </blockquote>
            <br>
            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 ?<br>
            <br>
            Is this a usecase that we would not be supporting ?</div>
        </blockquote>
      </div>
      <div>Basically, you told the linker to do its job and link
        together object files as if making a final executable, then use
        an option to the linker to save the atom graph as yaml or
        native.  Then try to use that atom graph later as if it is a
        input relocatable object.</div>
      <div><br>
      </div>
      <div>The only use case I find interesting is once the native
        format settings down and someone wants to convert a file to it.
         It would be good to have a way to do that.  If need be, we
        could write a Pass that re-inserts UndefinedAtoms for references
        to group owned atoms and get that pass to run just when doing
        that conversion.</div>
      <div><br>
      </div>
    </blockquote>
    Thanks for the info, Nick. This is a nice plan.<br>
    <br>
    Shankar Easwaran<br>
    <pre class="moz-signature" cols="72">-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation</pre>
  </body>
</html>