[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: objc compiler not detected
From: |
Wolfgang Lux |
Subject: |
Re: objc compiler not detected |
Date: |
Sat, 5 Oct 2013 19:23:08 +0200 |
Riccardo Mottola wrote:
> Do you think this simple test in gdb is enough?
>
> (gdb) b __objc_exec_class
> Breakpoint 1 at 0x80485d0
> (gdb) r
> Starting program:
> /home/multix/gnustep-cvs/devmodules/core/base/config/conftest
> objc runtime: cannot find class Test
>
> Program received signal SIGABRT, Aborted.
> [Switching to LWP 1]
> 0xbbb37c17 in _lwp_kill () from /usr/lib/libc.so.12
>
>
> It means that I never get into that.
So there is a problem here. On NetBSD 6.1.2, the compiler implicitly generates
a function __objc_gnu_init in the object file for config.objc.m that calls
__objc_exec for all classes defined in the source file (i.e., Test in this test
program). This function is recorded in the constructor section of the object
file and hence should be executed before the main function.
If this doesn't happen in current, then either the compiler does not generate
the __objc_gnu_init function or does not mark it as a constructor, or the
runtime linker on NetBSD does not execute constructor sections before the main
function (which it should). For reference, I have attached the assembler file
produced for config.objc on NetBSD 6.1.2. So might want to compare this with
the file generated on current or just use this file instead of the one produced
on current to link the config.objc executable and see if that works.
Wolfgang
config.objc.s
Description: Binary data
- objc compiler not detected, Riccardo Mottola, 2013/10/03
- Re: objc compiler not detected, Wolfgang Lux, 2013/10/03
- Re: objc compiler not detected, Riccardo Mottola, 2013/10/03
- Re: objc compiler not detected, Wolfgang Lux, 2013/10/03
- Re: objc compiler not detected, Riccardo Mottola, 2013/10/04
- Re: objc compiler not detected, Wolfgang Lux, 2013/10/04
- Re: objc compiler not detected, Riccardo Mottola, 2013/10/04
- Re: objc compiler not detected,
Wolfgang Lux <=
- Re: objc compiler not detected, Riccardo Mottola, 2013/10/09