mirror of
https://github.com/samsonjs/compiler.git
synced 2026-04-27 14:57:45 +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 MachHeader::MemberSizes.inspect
|
||||||
puts "# of MachHeader members: " + MachHeader.size.to_s + ", size in bytes: " + MachHeader.bytesize.to_s
|
puts "# of MachHeader members: " + MachHeader.size.to_s + ", size in bytes: " + MachHeader.bytesize.to_s
|
||||||
mh = MachHeader.new(0xfeedface, 7, 3, "foobar")
|
mh = MachHeader.new(0xfeedface, 7, 3, "foobar")
|
||||||
%w[magic, cputype, cpusubtype, segname].each do |field|
|
%w[magic cputype cpusubtype segname].each do |field|
|
||||||
puts "#{field}(#{MachHeader.sizeof(field.to_sym)}): " + mh[field.to_sym].inspect
|
puts "#{field}(#{MachHeader.sizeof(field.to_sym)}): #{mh[field.to_sym].inspect}"
|
||||||
end
|
end
|
||||||
puts mh.pack_pattern.inspect
|
puts mh.pack_pattern.inspect
|
||||||
binstr = mh.serialize
|
binstr = mh.serialize
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ require 'build'
|
||||||
def main
|
def main
|
||||||
func = ARGV.shift
|
func = ARGV.shift
|
||||||
outdir = ARGV.shift || '.'
|
outdir = ARGV.shift || '.'
|
||||||
|
Dir.mkdir(outdir) unless File.exists?(outdir)
|
||||||
binformat = (ARGV.shift || 'elf').downcase
|
binformat = (ARGV.shift || 'elf').downcase
|
||||||
format = (ARGV.shift || 'asm').downcase
|
format = (ARGV.shift || 'asm').downcase
|
||||||
platform = `uname -s`.chomp.downcase
|
platform = `uname -s`.chomp.downcase
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue