Index: src/gdb-jit.cc |
diff --git a/src/gdb-jit.cc b/src/gdb-jit.cc |
index 2746806e925fe3d1acd65daf97092a4513be9846..2df282224050df3ddf0cdeacc0914da637080f0c 100644 |
--- a/src/gdb-jit.cc |
+++ b/src/gdb-jit.cc |
@@ -355,7 +355,7 @@ class ELFSection : public DebugSectionBase<ELFSectionHeader> { |
#if defined(__MACH_O) |
class MachOTextSection : public MachOSection { |
public: |
- MachOTextSection(uintptr_t align, |
+ MachOTextSection(uint32_t align, |
uintptr_t addr, |
uintptr_t size) |
: MachOSection("__text", |
@@ -588,7 +588,8 @@ class MachO BASE_EMBEDDED { |
Writer::Slot<MachOSection::Header> headers = |
w->CreateSlotsHere<MachOSection::Header>(sections_.length()); |
cmd->fileoff = w->position(); |
- header->sizeofcmds = w->position() - load_command_start; |
+ header->sizeofcmds = static_cast<uint32_t>(w->position() - |
+ load_command_start); |
for (int section = 0; section < sections_.length(); ++section) { |
sections_[section]->PopulateHeader(headers.at(section)); |
sections_[section]->WriteBody(headers.at(section), w); |