mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
llvm-ar: Pad the symbol table to 4 bytes.
It looks like ld64 requires it. With this we seem to be able to bootstrap using llvm-ar+/usr/bin/true instead of ar+ranlib (currently on stage2). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -237,8 +237,11 @@ writeSymbolTable(raw_fd_ostream &Out, object::Archive::Kind Kind,
|
||||
print32(Out, Kind, StringTable.size()); // byte count of the string table
|
||||
Out << StringTable;
|
||||
|
||||
if (Out.tell() % 2)
|
||||
Out << '\0';
|
||||
// ld64 requires the next member header to start at an offset that is
|
||||
// 4 bytes aligned.
|
||||
unsigned Pad = OffsetToAlignment(Out.tell(), 4);
|
||||
while (Pad--)
|
||||
Out.write(uint8_t(0));
|
||||
|
||||
// Patch up the size of the symbol table now that we know how big it is.
|
||||
unsigned Pos = Out.tell();
|
||||
|
Reference in New Issue
Block a user