[Nasm-bugs] [Bug 3392347] macho32 format bug: LC_SEGMENT command 0 filesize field greater than vmsize field

no-reply at bugzilla-nasm.gorcunov.org no-reply at bugzilla-nasm.gorcunov.org
Fri Apr 29 01:47:18 PDT 2016


http://bugzilla.nasm.us/show_bug.cgi?id=3392347

--- Comment #4 from zenith432 at users.sourceforge.net ---
clang assembler from Xcode 7.3 does not align to 4 bytes.

====== y.s
  .code32
  nop
  movb $3, %al
  .data
  .byte 1,2,3
======

as -v
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.4.0

as -V -o y.o y.s
/Volumes/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-x assembler -o y.o y.s -integrated-as -c 

otool -l y.o

y.o:
Load command 0
      cmd LC_SEGMENT_64
  cmdsize 232
  segname 
   vmaddr 0x0000000000000000
   vmsize 0x0000000000000006
  fileoff 280
 filesize 6
  maxprot 0x00000007
 initprot 0x00000007
   nsects 2
    flags 0x0
Section
  sectname __text
   segname __TEXT
      addr 0x0000000000000000
      size 0x0000000000000003
    offset 280
     align 2^0 (1)
    reloff 0
    nreloc 0
     flags 0x80000400
 reserved1 0
 reserved2 0
Section
  sectname __data
   segname __DATA
      addr 0x0000000000000003
      size 0x0000000000000003
    offset 283
     align 2^0 (1)
    reloff 0
    nreloc 0
     flags 0x00000000
 reserved1 0
 reserved2 0
Load command 1
      cmd LC_VERSION_MIN_MACOSX
  cmdsize 16
  version 10.11
      sdk n/a

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list