Subject: bug#9927: unexec/unexmacosx fails with GCC 4.6.1 on intel Mac OS X 10.6.8

From: Peter Dyballa <[email-masked]>
Date: Thu, 17 May 2012 10:36:13 +0200

Am 17.05.2012 um 08:35 schrieb Paul Eggert:

> 
> I'm afraid that fixing it will require some expertise in Mac OS X and
> its executable format, expertise that I do not have.

And neither me... Maybe it's not necessary to work hard on this: Apple prefers Clang and LLVM GCC 4.2 over GCC 4.5, 4.6, 4.7,... These produce files unexmacosx can handle.

Here is a slightly different failure when I use GCC 4.7.0:

	--- Header Information ---
	Magic = 0xfeedface
	CPUType = 7
	CPUSubType = 3
	FileType = 0x2
	NCmds = 25
	SizeOfCmds = 2564
	Flags = 0x01000085
	Highest address of load commands in input file: 0x438000
	Lowest offset of all sections in __TEXT segment:   0x1650
	--- List of Load Commands in Input File ---
	# cmd              cmdsize name                address     size
	0 LC_SEGMENT             56 __PAGEZERO                0   0x1000
	1 LC_SEGMENT            600 __TEXT               0x1000 0x1b0000
	                           __text               0x2650 0x155c63
	                           __text_cold        0x1582b3    0x761
	                           __text_startup     0x158a14   0x1339
	                           __symbol_stub      0x159d4e    0xc90
	                           __stub_helper      0x15a9e0   0x14fc
	                           __cstring          0x15bedc  0x14683
	                           __const            0x170560    0x838
	                           __eh_frame         0x170d98  0x40268
	2 LC_SEGMENT            736 __DATA             0x1b1000 0x1dc000
	                           __program_vars     0x1b1000     0x14
	                           __nl_symbol_ptr    0x1b1014    0xb14
	                           __la_symbol_ptr    0x1b1b28    0x860
	                           __data             0x1b2390 0x1956dc
	                           __const            0x347a70   0x1008
	                           __static_data      0x348a80     0x31
	                           __bss4             0x348ac0   0x6554
	                           __bss2             0x34f014  0x2fb68
	                           __pu_bss2          0x37eb7c   0x5414
	                           __pu_bss4          0x383f90   0x85e4
	3 LC_SEGMENT             56 __LINKEDIT         0x38d000  0xab000
	4 LC_DYLD_INFO_ONLY      48
	5 LC_SYMTAB              24
	6 LC_DYSYMTAB            80
	7 LC_LOAD_DYLINKER       28
	8 LC_UUID                24
	9 LC_UNIXTHREAD          80
	10 LC_LOAD_DYLIB          52
	11 LC_LOAD_DYLIB          52
	12 LC_LOAD_DYLIB          52
	13 LC_LOAD_DYLIB          52
	14 LC_LOAD_DYLIB          52
	15 LC_LOAD_DYLIB          52
	16 LC_LOAD_DYLIB          56
	17 LC_LOAD_DYLIB          56
	18 LC_LOAD_DYLIB          72
	19 LC_LOAD_DYLIB          68
	20 LC_LOAD_DYLIB          60
	21 LC_LOAD_DYLIB          48
	22 LC_LOAD_DYLIB          52
	23 LC_LOAD_DYLIB          56
	24 LC_LOAD_DYLIB          52
	 0x1cfc080 (sz:   0x3f1c/  0x3f20)
	 0x1c00000 (sz:  0xfc080/ 0xfc080)
	 0x18fc080 (sz:   0x3f1c/  0x3f20)
	 0x1800000 (sz:  0xfc080/ 0xfc080)
	 0x27f8000 (sz:   0x5316/  0x7f98)
	 0x2000000 (sz: 0x52f08b/0x7f8000)
	  0xae6000 (sz:        0/  0x1000)
	--- Load Commands written to Output File ---
	Writing segment __PAGEZERO       @        0 (       0/  0x1000 @          0)
	Writing segment __TEXT           @        0 (0x1b0000/0x1b0000 @     0x1000)
	Writing segment __DATA           @ 0x1b0000 (0x1dc000/0x1dc000 @   0x1b1000)
	        section __program_vars   at 0x1b0000 - 0x1b0014 (sz:     0x14)
	        section __nl_symbol_ptr  at 0x1b0014 - 0x1b0b28 (sz:    0xb14)
	        section __la_symbol_ptr  at 0x1b0b28 - 0x1b1388 (sz:    0x860)
	        section __data           at 0x1b1390 - 0x346a6c (sz: 0x1956dc)
	        section __const          at 0x346a70 - 0x347a78 (sz:   0x1008)
	unexec: unrecognized section name in __DATA segment
	make[1]: *** [bootstrap-emacs] Error 1
	make[1]: Target `all' not remade because of errors.
	make: *** [src] Error 2
	make: Target `all' not remade because of errors.

--
Greetings

  Pete

To most people solutions mean finding the answers. But to chemists solutions
are things that are still all mixed up.