mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 01:11:44 +00:00
Object: pad BSD ar string table to 4-bytes
cctools would pad the string table to a sizeof(int32_t) (explicitly printed out by cctools rather than 4). This adjusts the string table to make it more compatible with cctools, but is insufficient to make ld64 happy. llvm-svn: 294557
This commit is contained in:
parent
f68160ea2c
commit
9aa659cc4d
@ -316,6 +316,10 @@ writeSymbolTable(raw_fd_ostream &Out, object::Archive::Kind Kind,
|
||||
if (HeaderStartOffset == 0)
|
||||
return 0;
|
||||
|
||||
if (Kind == object::Archive::K_BSD)
|
||||
for (unsigned P = OffsetToAlignment(NameOS.tell(), sizeof(int32_t)); P--;)
|
||||
NameOS << '\0';
|
||||
|
||||
StringRef StringTable = NameOS.str();
|
||||
if (Kind == object::Archive::K_BSD)
|
||||
print32(Out, Kind, StringTable.size()); // byte count of the string table
|
||||
|
Loading…
Reference in New Issue
Block a user