[PATCH] D45260: COFF: Layout sections in the same order as link.exe
    Hans Wennborg via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Apr  4 08:14:47 PDT 2018
    
    
  
hans created this revision.
hans added reviewers: ruiu, rnk, thakis, inglorion.
Herald added subscribers: javed.absar, mehdi_amini.
One place where this seems to matter is to make sure the .rsrc section comes after .text. The Win32 UpdateResource function can change the contents of .rsrc. It will move the sections that come after, but if .text gets moved, the entry point header will not get updated and the executable breaks. This was found by a test in Chromium.
https://reviews.llvm.org/D45260
Files:
  COFF/Writer.cpp
  test/COFF/arm64-relocs-imports.test
  test/COFF/armnt-movt32t.test
  test/COFF/associative-comdat.s
  test/COFF/baserel.test
  test/COFF/combined-resources.test
  test/COFF/common-alignment.test
  test/COFF/common.test
  test/COFF/ctors_dtors_priority.s
  test/COFF/delayimports-armnt.yaml
  test/COFF/delayimports.test
  test/COFF/delayimports32.test
  test/COFF/export-armnt.yaml
  test/COFF/hello32.test
  test/COFF/imports.test
  test/COFF/loadcfg.ll
  test/COFF/loadcfg.test
  test/COFF/loadcfg32.test
  test/COFF/lto-comdat.ll
  test/COFF/lto.ll
  test/COFF/manifestinput.test
  test/COFF/pdata-arm64.yaml
  test/COFF/pdb-comdat.test
  test/COFF/pdb-globals.test
  test/COFF/pdb-procid-remapping.test
  test/COFF/pdb-scopes.test
  test/COFF/pdb-source-lines.test
  test/COFF/pdb-symbol-types.yaml
  test/COFF/pdb-type-server-simple.test
  test/COFF/pdb.test
  test/COFF/reloc-arm.test
  test/COFF/resource.test
  test/COFF/safeseh.s
  test/COFF/secidx-absolute.s
  test/COFF/secrel-common.s
  test/COFF/sort-debug.test
  test/COFF/string-tail-merge.s
  test/COFF/symtab.test
  test/COFF/unwind.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45260.140960.patch
Type: text/x-patch
Size: 58225 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180404/94010ee7/attachment.bin>
    
    
More information about the llvm-commits
mailing list