mirror of
https://github.com/samsonjs/compiler.git
synced 2026-03-25 08:45:52 +00:00
small bug fixes
This commit is contained in:
parent
e77ac481d8
commit
20c758ae85
2 changed files with 3 additions and 2 deletions
|
|
@ -327,8 +327,8 @@ if $0 == __FILE__
|
|||
puts MachHeader::MemberSizes.inspect
|
||||
puts "# of MachHeader members: " + MachHeader.size.to_s + ", size in bytes: " + MachHeader.bytesize.to_s
|
||||
mh = MachHeader.new(0xfeedface, 7, 3, "foobar")
|
||||
%w[magic, cputype, cpusubtype, segname].each do |field|
|
||||
puts "#{field}(#{MachHeader.sizeof(field.to_sym)}): " + mh[field.to_sym].inspect
|
||||
%w[magic cputype cpusubtype segname].each do |field|
|
||||
puts "#{field}(#{MachHeader.sizeof(field.to_sym)}): #{mh[field.to_sym].inspect}"
|
||||
end
|
||||
puts mh.pack_pattern.inspect
|
||||
binstr = mh.serialize
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ require 'build'
|
|||
def main
|
||||
func = ARGV.shift
|
||||
outdir = ARGV.shift || '.'
|
||||
Dir.mkdir(outdir) unless File.exists?(outdir)
|
||||
binformat = (ARGV.shift || 'elf').downcase
|
||||
format = (ARGV.shift || 'asm').downcase
|
||||
platform = `uname -s`.chomp.downcase
|
||||
|
|
|
|||
Loading…
Reference in a new issue