[llvm-branch-commits] [lld] 9e708ac - [COFF] Fix relocation offsets in pdb-file-statics test input

Reid Kleckner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jan 20 11:50:23 PST 2021


Author: Reid Kleckner
Date: 2021-01-20T11:45:30-08:00
New Revision: 9e708ac6b9929e9baa2017ff62f2353e6621a105

URL: https://github.com/llvm/llvm-project/commit/9e708ac6b9929e9baa2017ff62f2353e6621a105
DIFF: https://github.com/llvm/llvm-project/commit/9e708ac6b9929e9baa2017ff62f2353e6621a105.diff

LOG: [COFF] Fix relocation offsets in pdb-file-statics test input

The relocation offsets were incorrect. I fixed them with llvm-readobj
-codeview -codeview-subsection-bytes, which has a helpful printout of
the relocations that apply to a given symbol record with their offsets.
With this, I was able to update the relocation offsets in the yaml to
fix the line table and the S_DEFRANGE_REGISTER records.

There is still some remaining inconsistency in yaml2obj and obj2yaml
when round tripping MSVC objects, but that isn't a blocker for relanding
D94267.

Added: 
    

Modified: 
    lld/test/COFF/Inputs/pdb-file-statics-a.yaml

Removed: 
    


################################################################################
diff  --git a/lld/test/COFF/Inputs/pdb-file-statics-a.yaml b/lld/test/COFF/Inputs/pdb-file-statics-a.yaml
index 27e2ee160724..8ece65403460 100644
--- a/lld/test/COFF/Inputs/pdb-file-statics-a.yaml
+++ b/lld/test/COFF/Inputs/pdb-file-statics-a.yaml
@@ -1591,16 +1591,16 @@ sections:
       - VirtualAddress:  154
         SymbolName:      main
         Type:            IMAGE_REL_AMD64_SECTION
-      - VirtualAddress:  229
+      - VirtualAddress:  222
         SymbolName:      main
         Type:            IMAGE_REL_AMD64_SECREL
-      - VirtualAddress:  233
+      - VirtualAddress:  226
         SymbolName:      main
         Type:            IMAGE_REL_AMD64_SECTION
-      - VirtualAddress:  336
+      - VirtualAddress:  328
         SymbolName:      main
         Type:            IMAGE_REL_AMD64_SECREL
-      - VirtualAddress:  340
+      - VirtualAddress:  332
         SymbolName:      main
         Type:            IMAGE_REL_AMD64_SECTION
   - Name:            .xdata


        


More information about the llvm-branch-commits mailing list