From: Simon Wright <simon@pushface.org>
Subject: Re: MinGW-w64 gnatlink "undefined reference"
Date: Sun, 10 Apr 2011 07:18:29 +0100
Date: 2011-04-10T07:18:29+01:00 [thread overview]
Message-ID: <m28vvityru.fsf@pushface.org> (raw)
In-Reply-To: Z_mdnaEwd_oLgDzQnZ2dnUVZ_jednZ2d@posted.vianet
mjamesb <mjamesb> writes:
> x86_64-w64-mingw32-gnatlink helloworld.ali
> /usr/lib/gcc/x86_64-w64-mingw32/4.5.2/adalib/libgnat.a(s-exctab.o): In function `system__exception_table__internal_exception':
> /home/user/mingw64/mingw64-x86_64-gcc-4.5.2-1/build/gcc/ada/rts/s-exctab.adb:154: undefined reference to `__gnat_eh_personality_sj'
What this is saying is that the RTS (run time system) s-exctab.o
(System.Exception_Table) contains a reference which isn't satisfied.
This is nothing to do with your code, it's that Ada.Text_IO calls in
vast chunks of the RTS including exception handling.
To see what's happening at link time, you'd need to ask for verbose
linker output:
- for verbose output from gnatlink (which calls up the linker):
$ gnatmake helloworld.adb -largs -v
- for verbose output from the linker itself:
$ gnatmake helloworld.adb -largs -Wl,-v
'__gnat_eh_personality_sj' is to do with the way the RTS handles
exceptions. Reading between the lines in
http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gnat_ugn_unw/Exception-Handling-Control.html
your problem will be related to the setjmp/longjmp method, and you
could try 'gnatmake helloworld.adb --RTS=zcx', but in any
case there's no excuse for the default RTS to be incomplete. I think
you need to take this up with whoever built your compiler.
prev parent reply other threads:[~2011-04-10 6:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-10 3:01 MinGW-w64 gnatlink "undefined reference" mjamesb
2011-04-10 6:18 ` Simon Wright [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox