Package: file Version: 1:5.32-1 Severity: normal Dear Maintainer,
file(1) recognizes 32bit Windows object files just fine... ,---- | $ i686-w64-mingw32-gcc -o hello.o -c hello.c | $ file hello.o | hello.o: Intel 80386 COFF object file, no line number info, not stripped, 5 sections, symbol offset=0x146, 16 symbols `---- ... but it knows nothing about 64bit files -- yet: ,---- | $ x86_64-w64-mingw32-gcc -o hello.o -c hello.c | $ file hello.o | hello.o: data `---- Here's what the corresponding objdump has to tell us: ,---- | $ x86_64-w64-mingw32-objdump -x hello.o | | hello.o: file format pe-x86-64 | hello.o | architecture: i386:x86-64, flags 0x00000039: | HAS_RELOC, HAS_DEBUG, HAS_SYMS, HAS_LOCALS | start address 0x0000000000000000 | | Characteristics 0x4 | line numbers stripped | | Time/Date Thu Jan 1 01:00:00 1970 | Magic 0000 | MajorLinkerVersion 0 | MinorLinkerVersion 0 | SizeOfCode 00000000 | SizeOfInitializedData 00000000 | SizeOfUninitializedData 00000000 | AddressOfEntryPoint 0000000000000000 | BaseOfCode 0000000000000000 | ImageBase 0000000000000000 | SectionAlignment 0000000000000000 | FileAlignment 0000000000000000 | MajorOSystemVersion 0 | MinorOSystemVersion 0 | MajorImageVersion 0 | MinorImageVersion 0 | MajorSubsystemVersion 0 | MinorSubsystemVersion 0 | Win32Version 00000000 | SizeOfImage 00000000 | SizeOfHeaders 00000000 | CheckSum 00000000 | Subsystem 00000000 (unspecified) | DllCharacteristics 00000000 | SizeOfStackReserve 0000000000000000 | SizeOfStackCommit 0000000000000000 | SizeOfHeapReserve 0000000000000000 | SizeOfHeapCommit 0000000000000000 | LoaderFlags 00000000 | NumberOfRvaAndSizes 00000000 | | The Data Directory | Entry 0 0000000000000000 00000000 Export Directory [.edata (or where ever we found it)] | Entry 1 0000000000000000 00000000 Import Directory [parts of .idata] | Entry 2 0000000000000000 00000000 Resource Directory [.rsrc] | Entry 3 0000000000000000 00000000 Exception Directory [.pdata] | Entry 4 0000000000000000 00000000 Security Directory | Entry 5 0000000000000000 00000000 Base Relocation Directory [.reloc] | Entry 6 0000000000000000 00000000 Debug Directory | Entry 7 0000000000000000 00000000 Description Directory | Entry 8 0000000000000000 00000000 Special Directory | Entry 9 0000000000000000 00000000 Thread Storage Directory [.tls] | Entry a 0000000000000000 00000000 Load Configuration Directory | Entry b 0000000000000000 00000000 Bound Import Directory | Entry c 0000000000000000 00000000 Import Address Table Directory | Entry d 0000000000000000 00000000 Delay Import Directory | Entry e 0000000000000000 00000000 CLR Runtime Header | Entry f 0000000000000000 00000000 Reserved | | The Function Table (interpreted .pdata section contents) | vma: BeginAddress EndAddress UnwindData | 0000000000000000: 0000000000000000 000000000000002b 0000000000000000 | | Dump of .xdata | 0000000000000000 (rva: 00000000): 0000000000000000 - 000000000000002b | Version: 1, Flags: none | Nbr codes: 3, Prologue size: 0x08, Frame offset: 0x0, Frame reg: rbp | pc+0x08: alloc small area: rsp = rsp - 0x20 | pc+0x04: FPReg: rbp = rsp + 0x0 (info = 0x0) | pc+0x01: push rbp | | Sections: | Idx Name Size VMA LMA File off Algn | 0 .text 00000030 0000000000000000 0000000000000000 0000012c 2**4 | CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE | 1 .data 00000000 0000000000000000 0000000000000000 00000000 2**4 | ALLOC, LOAD, DATA | 2 .bss 00000000 0000000000000000 0000000000000000 00000000 2**4 | ALLOC | 3 .rdata 00000010 0000000000000000 0000000000000000 0000015c 2**4 | CONTENTS, ALLOC, LOAD, READONLY, DATA | 4 .xdata 0000000c 0000000000000000 0000000000000000 0000016c 2**2 | CONTENTS, ALLOC, LOAD, READONLY, DATA | 5 .pdata 0000000c 0000000000000000 0000000000000000 00000178 2**2 | CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA | 6 .rdata$zzz 00000020 0000000000000000 0000000000000000 00000184 2**4 | CONTENTS, ALLOC, LOAD, READONLY, DATA | SYMBOL TABLE: | [ 0](sec -2)(fl 0x00)(ty 0)(scl 103) (nx 1) 0x0000000000000000 hello.c | File | [ 2](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 1) 0x0000000000000000 main | AUX tagndx 0 ttlsiz 0x0 lnnos 0 next 0 | [ 4](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x0000000000000000 .text | AUX scnlen 0x2b nreloc 3 nlnno 0 | [ 6](sec 2)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x0000000000000000 .data | AUX scnlen 0x0 nreloc 0 nlnno 0 | [ 8](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x0000000000000000 .bss | AUX scnlen 0x0 nreloc 0 nlnno 0 | [ 10](sec 4)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x0000000000000000 .rdata | AUX scnlen 0xc nreloc 0 nlnno 0 | [ 12](sec 5)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x0000000000000000 .xdata | AUX scnlen 0xc nreloc 0 nlnno 0 | [ 14](sec 6)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x0000000000000000 .pdata | AUX scnlen 0xc nreloc 3 nlnno 0 | [ 16](sec 7)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x0000000000000000 .rdata$zzz | AUX scnlen 0x1a nreloc 0 nlnno 0 | [ 18](sec 0)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x0000000000000000 __main | [ 19](sec 0)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x0000000000000000 puts | | | RELOCATION RECORDS FOR [.text]: | OFFSET TYPE VALUE | 0000000000000010 R_X86_64_PC32 __main | 0000000000000017 R_X86_64_PC32 .rdata | 000000000000001c R_X86_64_PC32 puts | | | RELOCATION RECORDS FOR [.pdata]: | OFFSET TYPE VALUE | 0000000000000000 rva32 .text | 0000000000000004 rva32 .text | 0000000000000008 rva32 .xdata `---- Cheers, -Hilko