uint64_t Binary::virtual_size() const {
  uint64_t virtual_size = 0;
  for (const SegmentCommand* segment : segments_) {
    virtual_size = std::max(virtual_size, segment->virtual_address() + segment->virtual_size());
  }
  virtual_size -= imagebase();
  virtual_size = align(virtual_size, static_cast<uint64_t>(page_size()));
  return virtual_size;
}
uint64_t Binary::virtual_size() const {
  uint64_t virtual_size = 0;
  for (const SegmentCommand* segment : segments_) {
    virtual_size = std::max(virtual_size, segment->virtual_address() + segment->virtual_size());
  }
  virtual_size -= imagebase();
  virtual_size = align(virtual_size, static_cast<uint64_t>(page_size()));
  return virtual_size;
}