Skip to content

Commit 476a7f9

Browse files
committedOct 3, 2017
Pre-compute the tail of the archive
An archive looks like <header> <symbol table> <tail> The symbol table refers to offsets in the tail. A complication is that we would like to support symbol tables that use 64 bit offsets if it turns out that any of the offsets is too big. This patch changes the archive writer to first compute the tail. We cannot just compute one big StringRef since that would require reading every member upfront, but we can represent it as a series of StringRefs. Having done that it is much easier to compute the symbol table and all offsets are computed before it is written. With this if there is an accounting problem it will show up with a regular symbol table, not just when a 64 bit one is needed. llvm-svn: 314844
1 parent a952b44 commit 476a7f9

File tree

1 file changed

+184
-177
lines changed

1 file changed

+184
-177
lines changed
 

0 commit comments

Comments
 (0)