On 29 Oct 2010, at 09:56, Dave Korn wrote:
This implements an object file reader/writer which does everything
required by LTO and gccgo. The ELF code works. I have not tested
the
Mach-O and COFF code at all beyond compiling it; I hope that somebody
else can test those targets and fix them.
I'm right here :) Can't help with Darwin but hopefully Jack/Iain
will be
available.
I tried with 166058 on ppc-darwin9 (my other machines are tied up
right now)
-flto fails on link with missing _main.
e.g:
Executing on host: /Volumes/ScratchCS/gcc-4-6-trunk-build/gcc/xgcc -B/
Volumes/ScratchCS/gcc-4-6-trunk-build/gcc/ c_lto_20081024_0.o -
O0 -flto -m32 -o gcc-dg-lto-20081024-21 (timeout = 60)
Undefined symbols:
"_main", referenced from:
start in crt1.10.5.o
-whopr ices with:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x007f8e18 in objfile_mach_o_find_sections (objfile=0x40e078b0,
pfn=0x1d7ec <lto_obj_add_section>, data=0xbffff19c, err=0xbffff198)
at /GCC/gcc-live-trunk/libiberty/objfile-mach-o.c:469
469 memcpy (name, sechdr + sectname_offset, MACH_O_NAME_LEN);
(gdb) bt
#0 0x007f8e18 in objfile_mach_o_find_sections (objfile=0x40e078b0,
pfn=0x1d7ec <lto_obj_add_section>, data=0xbffff19c, err=0xbffff198)
at /GCC/gcc-live-trunk/libiberty/objfile-mach-o.c:469
#1 0x007f5dbc in objfile_find_sections (objfile=<value temporarily
unavailable, due to optimizations>, pfn=<value temporarily
unavailable, due to optimizations>, data=<value temporarily
unavailable, due to optimizations>, err=<value temporarily
unavailable, due to optimizations>) at /GCC/gcc-live-trunk/libiberty/
objfile.c:173
#2 0x0001dc60 in lto_obj_build_section_table (lto_file=<value
temporarily unavailable, due to optimizations>) at /GCC/gcc-live-trunk/
gcc/lto/lto-objfile.c:270
#3 0x0001af80 in lto_read_all_file_options () at /GCC/gcc-live-trunk/
gcc/lto/lto.c:2052
#4 0x00003960 in lto_post_options (pfilename=<value temporarily
unavailable, due to optimizations>) at /GCC/gcc-live-trunk/gcc/lto/lto-
lang.c:709
#5 0x004f0eec in toplev_main (argc=15, argv=Cannot access memory at
address 0x1c
) at /GCC/gcc-live-trunk/gcc/toplev.c:1778
#6 0x00001944 in start ()
if you need more analysis - ping me with what and I'll try and do sth
-- or maybe Jack can help with a user on his machine.
cheers,
Iain