Changes in directory llvm/lib/Linker:

LinkModules.cpp updated: 1.130 -> 1.131
---
Log message:

preserve sections of globals

---
Diffs of the changes:  (+10 -1)

 LinkModules.cpp |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletion(-)


Index: llvm/lib/Linker/LinkModules.cpp
diff -u llvm/lib/Linker/LinkModules.cpp:1.130 
llvm/lib/Linker/LinkModules.cpp:1.131
--- llvm/lib/Linker/LinkModules.cpp:1.130       Tue Jan 30 14:08:37 2007
+++ llvm/lib/Linker/LinkModules.cpp     Thu Feb  1 11:12:54 2007
@@ -478,7 +478,10 @@
                            SGV->getName(), Dest);
       // Propagate alignment info.
       NewDGV->setAlignment(SGV->getAlignment());
-      
+
+      // Propagate section info.
+      NewDGV->setSection(SGV->getSection());
+
       // If the LLVM runtime renamed the global, but it is an externally 
visible
       // symbol, DGV must be an existing global with internal linkage.  Rename
       // it.
@@ -503,6 +506,9 @@
       // Propagate alignment info.
       NewDGV->setAlignment(std::max(DGV->getAlignment(), SGV->getAlignment()));
 
+      // Propagate section info.
+      NewDGV->setSection(SGV->getSection());
+
       // Make sure to remember this mapping...
       ValueMap.insert(std::make_pair(SGV, NewDGV));
 
@@ -512,6 +518,9 @@
       // Propagate alignment info.
       DGV->setAlignment(std::max(DGV->getAlignment(), SGV->getAlignment()));
 
+      // Propagate section info.
+      DGV->setSection(SGV->getSection());
+
       // Otherwise, perform the mapping as instructed by GetLinkageResult.  If
       // the types don't match, and if we are to link from the source, nuke DGV
       // and create a new one of the appropriate type.



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to