mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
Add printing the LC_LINKER_OPTION load command with llvm-objdump’s -private-headers.
Also corrected the name of the load command to not end in an ’S’ as well as corrected the name of the MachO::linker_option_command struct and other places that had the word option as plural which did not match the Mac OS X headers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224485 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -418,7 +418,7 @@ void MachObjectWriter::WriteLinkeditLoadCommand(uint32_t Type,
|
||||
static unsigned ComputeLinkerOptionsLoadCommandSize(
|
||||
const std::vector<std::string> &Options, bool is64Bit)
|
||||
{
|
||||
unsigned Size = sizeof(MachO::linker_options_command);
|
||||
unsigned Size = sizeof(MachO::linker_option_command);
|
||||
for (unsigned i = 0, e = Options.size(); i != e; ++i)
|
||||
Size += Options[i].size() + 1;
|
||||
return RoundUpToAlignment(Size, is64Bit ? 8 : 4);
|
||||
@ -431,10 +431,10 @@ void MachObjectWriter::WriteLinkerOptionsLoadCommand(
|
||||
uint64_t Start = OS.tell();
|
||||
(void) Start;
|
||||
|
||||
Write32(MachO::LC_LINKER_OPTIONS);
|
||||
Write32(MachO::LC_LINKER_OPTION);
|
||||
Write32(Size);
|
||||
Write32(Options.size());
|
||||
uint64_t BytesWritten = sizeof(MachO::linker_options_command);
|
||||
uint64_t BytesWritten = sizeof(MachO::linker_option_command);
|
||||
for (unsigned i = 0, e = Options.size(); i != e; ++i) {
|
||||
// Write each string, including the null byte.
|
||||
const std::string &Option = Options[i];
|
||||
|
Reference in New Issue
Block a user