[PATCH] D36812: Add support for writing 64-bit symbol tables for archives when offsets become too large for 32-bit

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 16:00:11 PDT 2017


jakehehrlich updated this revision to Diff 111578.
jakehehrlich added a comment.

1. Removed changes to allow for > 4GB members as Roland recommended
2. This had the consequence of nullifying the need for the static cast and the comment change
3. I merged print32 and print64 into a single file but I did not get rid of printNBits. The decision to switch to outputting a 64-bit symbol table is made dynamically so there will need to be an if statement that calls one template instance or the other of any template that might merge the behaviors. I see 3 possible options

1. use printNBits as I am
2. tempalte writeSymbolTable and replace the one call to printNBits in writeArchive with an if statement that decides which print to call. This would also need an if statement to decide which writeSymbolTable to call.
3. template writeSymbolTable and make a template that does what writeArchive does, call it writeArchiveT. writeArchive will the decide which type to instantiate writeArchiveT with while writeArchiveT will do the work that writeArchive does now.

option 1) seems the least invasive to me personally.


Repository:
  rL LLVM

https://reviews.llvm.org/D36812

Files:
  lib/Object/ArchiveWriter.cpp
  test/Object/archive-SYM64-write.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36812.111578.patch
Type: text/x-patch
Size: 9886 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170817/d2737214/attachment.bin>


More information about the llvm-commits mailing list