summaryrefslogtreecommitdiffstats
path: root/llvm/tools/obj2yaml/coff2yaml.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-11-29 20:53:57 +0000
committerMartin Storsjo <martin@martin.st>2018-11-29 20:53:57 +0000
commitc1410635bfa8979862606056b5fc1eb5db4840e5 (patch)
treeea9918a2c256849eb51061de9a3558e12aa0a341 /llvm/tools/obj2yaml/coff2yaml.cpp
parent2b40470c6181c6b513146424fb963076114bbdd1 (diff)
downloadbcm5719-llvm-c1410635bfa8979862606056b5fc1eb5db4840e5.tar.gz
bcm5719-llvm-c1410635bfa8979862606056b5fc1eb5db4840e5.zip
[obj2yaml] [COFF] Write RVA instead of VA for sections, fix roundtripping executables
yaml2obj writes the yaml value as is to the output file. Differential Revision: https://reviews.llvm.org/D54965 llvm-svn: 347916
Diffstat (limited to 'llvm/tools/obj2yaml/coff2yaml.cpp')
-rw-r--r--llvm/tools/obj2yaml/coff2yaml.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/obj2yaml/coff2yaml.cpp b/llvm/tools/obj2yaml/coff2yaml.cpp
index 57fb1d04075..6835dcf71ff 100644
--- a/llvm/tools/obj2yaml/coff2yaml.cpp
+++ b/llvm/tools/obj2yaml/coff2yaml.cpp
@@ -147,7 +147,7 @@ void COFFDumper::dumpSections(unsigned NumSections) {
COFFYAML::Section NewYAMLSection;
ObjSection.getName(NewYAMLSection.Name);
NewYAMLSection.Header.Characteristics = COFFSection->Characteristics;
- NewYAMLSection.Header.VirtualAddress = ObjSection.getAddress();
+ NewYAMLSection.Header.VirtualAddress = COFFSection->VirtualAddress;
NewYAMLSection.Header.VirtualSize = COFFSection->VirtualSize;
NewYAMLSection.Header.NumberOfLineNumbers =
COFFSection->NumberOfLinenumbers;
OpenPOWER on IntegriCloud