<div dir="ltr">What did you address? The commit message says that there's no functionality change by this commit.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 5, 2015 at 12:41 PM, Shankar Easwaran <span dir="ltr"><<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry, I missed your ping.<br>
<br>
There was a FIXME comment that I addressed as part of the commit. Previously I had to disable because of the RoundTripPasses.<br>
<br>
Shankar Easwaran<div class="HOEnZb"><div class="h5"><br>
<br>
On 3/5/2015 2:29 PM, Rui Ueyama wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ping. This added extra code but no additional functionality? I'll roll this<br>
back if it is so.<br>
<br>
On Wed, Feb 25, 2015 at 3:30 PM, Rui Ueyama <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ping?<br>
<br>
On Sun, Feb 22, 2015 at 7:36 PM, Rui Ueyama <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sat, Feb 21, 2015 at 7:49 AM, Shankar Easwaran <<br>
<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: shankare<br>
Date: Sat Feb 21 09:49:34 2015<br>
New Revision: 230138<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=230138&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=230138&view=rev</a><br>
Log:<br>
[ELF][Writer] Use Path to create AtomSection.<br>
<br>
Now since the correct file path for atoms is available and not clobbered,<br>
commit r222309 which was reverted previously can be added back.<br>
<br>
No change in functionality.<br>
<br>
</blockquote>
Why do we need this new code if it doesn't change anything?<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Modified:<br>
     lld/trunk/lib/ReaderWriter/<u></u>ELF/DefaultLayout.h<br>
     lld/trunk/lib/ReaderWriter/<u></u>ELF/Mips/MipsTargetHandler.h<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/DefaultLayout.h<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h?rev=230138&r1=230137&r2=230138&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/<u></u>DefaultLayout.h?rev=230138&r1=<u></u>230137&r2=230138&view=diff</a><br>
<br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/DefaultLayout.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/DefaultLayout.h Sat Feb 21 09:49:34<br>
2015<br>
@@ -91,24 +91,26 @@ public:<br>
    // The sections are created using<br>
    // SectionName, contentPermissions<br>
    struct SectionKey {<br>
-    SectionKey(StringRef name, DefinedAtom::<u></u>ContentPermissions perm)<br>
-        : _name(name), _perm(perm) {<br>
-    }<br>
+    SectionKey(StringRef name, DefinedAtom::<u></u>ContentPermissions perm,<br>
+               StringRef path)<br>
+        : _name(name), _perm(perm), _path(path) {}<br>
<br>
      // Data members<br>
      StringRef _name;<br>
      DefinedAtom::<u></u>ContentPermissions _perm;<br>
+    StringRef _path;<br>
    };<br>
<br>
    struct SectionKeyHash {<br>
      int64_t operator()(const SectionKey &k) const {<br>
-      return llvm::hash_combine(k._name, k._perm);<br>
+      return llvm::hash_combine(k._name, k._perm, k._path);<br>
      }<br>
    };<br>
<br>
    struct SectionKeyEq {<br>
      bool operator()(const SectionKey &lhs, const SectionKey &rhs) const<br>
{<br>
-      return ((lhs._name == rhs._name) && (lhs._perm == rhs._perm));<br>
+      return ((lhs._name == rhs._name) && (lhs._perm == rhs._perm) &&<br>
+              (lhs._path == rhs._path));<br>
      }<br>
    };<br>
<br>
@@ -181,9 +183,10 @@ public:<br>
    virtual StringRef getOutputSectionName(StringRef inputSectionName)<br>
const;<br>
<br>
    /// \brief Gets or creates a section.<br>
-  AtomSection<ELFT> *getSection(<br>
-      StringRef name, int32_t contentType,<br>
-      DefinedAtom::<u></u>ContentPermissions contentPermissions);<br>
+  AtomSection<ELFT> *<br>
+  getSection(StringRef name, int32_t contentType,<br>
+             DefinedAtom::<u></u>ContentPermissions contentPermissions,<br>
+             StringRef path);<br>
<br>
    /// \brief Gets the segment for a output section<br>
    virtual Layout::SegmentType getSegmentType(Section<ELFT> *section)<br>
const;<br>
@@ -530,22 +533,19 @@ AtomSection<ELFT> *DefaultLayout<ELFT>::<br>
  }<br>
<br>
  template <class ELFT><br>
-AtomSection<ELFT> *DefaultLayout<ELFT>::<u></u>getSection(<br>
-    StringRef sectionName, int32_t contentType,<br>
-    DefinedAtom::<u></u>ContentPermissions permissions) {<br>
-  // FIXME: We really need the file path here in the SectionKey, when<br>
that<br>
-  // is available, replace the sectionKey that has outputSectionName to<br>
the<br>
-  // inputSectionName.<br>
-  StringRef outputSectionName = getOutputSectionName(<u></u>sectionName);<br>
-  const SectionKey sectionKey(outputSectionName, permissions);<br>
+AtomSection<ELFT> *<br>
+DefaultLayout<ELFT>::<u></u>getSection(StringRef sectionName, int32_t<br>
contentType,<br>
+                                DefinedAtom::<u></u>ContentPermissions<br>
permissions,<br>
+                                StringRef path) {<br>
+  const SectionKey sectionKey(sectionName, permissions, path);<br>
+  SectionOrder sectionOrder =<br>
+      getSectionOrder(sectionName, contentType, permissions);<br>
    auto sec = _sectionMap.find(sectionKey);<br>
    if (sec != _sectionMap.end())<br>
      return sec->second;<br>
-  SectionOrder sectionOrder =<br>
-      getSectionOrder(sectionName, contentType, permissions);<br>
    AtomSection<ELFT> *newSec =<br>
        createSection(sectionName, contentType, permissions,<br>
sectionOrder);<br>
-  newSec->setOutputSectionName(<u></u>outputSectionName);<br>
+  newSec->setOutputSectionName(<u></u>getOutputSectionName(<u></u>sectionName));<br>
    newSec->setOrder(sectionOrder)<u></u>;<br>
    _sections.push_back(newSec);<br>
    _sectionMap.insert(std::make_<u></u>pair(sectionKey, newSec));<br>
@@ -565,8 +565,8 @@ ErrorOr<const lld::AtomLayout &> Default<br>
      const DefinedAtom::ContentType contentType =<br>
definedAtom->contentType();<br>
<br>
      StringRef sectionName = getInputSectionName(<u></u>definedAtom);<br>
-    AtomSection<ELFT> *section =<br>
-        getSection(sectionName, contentType, permissions);<br>
+    AtomSection<ELFT> *section = getSection(<br>
+        sectionName, contentType, permissions,<br>
definedAtom->file().path());<br>
<br>
      // Add runtime relocations to the .rela section.<br>
      for (const auto &reloc : *definedAtom) {<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/Mips/MipsTargetHandler.h<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h?rev=230138&r1=230137&r2=230138&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/Mips/<u></u>MipsTargetHandler.h?rev=<u></u>230138&r1=230137&r2=230138&<u></u>view=diff</a><br>
<br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/Mips/MipsTargetHandler.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/Mips/MipsTargetHandler.h Sat Feb 21<br>
09:49:34 2015<br>
@@ -67,6 +67,17 @@ public:<br>
      return *_gpDispAtom;<br>
    }<br>
<br>
+  /// \brief Return the section order for a input section<br>
+  virtual Layout::SectionOrder getSectionOrder(StringRef name,<br>
+                                               int32_t contentType,<br>
+                                               int32_t<br>
contentPermissions) {<br>
+    if ((contentType == DefinedAtom::typeStub) &&<br>
(name.startswith(".text")))<br>
+      return DefaultLayout<ELFType>::ORDER_<u></u>TEXT;<br>
+<br>
+    return DefaultLayout<ELFType>::<u></u>getSectionOrder(name, contentType,<br>
+                                                   contentPermissions);<br>
+  }<br>
+<br>
  private:<br>
    llvm::BumpPtrAllocator _alloc;<br>
    MipsGOTSection<ELFType> *_gotSection;<br>
<br>
<br>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
<br>
</blockquote>
<br>
</blockquote></blockquote></blockquote>
<br>
<br></div></div><span class="HOEnZb"><font color="#888888">
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation<br>
<br>
</font></span></blockquote></div><br></div>