[PATCH/RFC] PIC and flat shared library support for m68k
Richard Sandiford
richard at codesourcery.com
Fri Jul 7 00:06:05 PDT 2006
David McCullough <david_mccullough at au.securecomputing.com> writes:
> Jivin Richard Sandiford lays it down ...
>> This patch adds m68k support for flat shared libraries and uClinux-style
>> PIC. The reason I've stuck "RFC" in the subject line is that the shared
>> library side of things is rather different from the uClinux-dist version,
>> and this might make the patch a little controversial. However, the new
>> approach should still be compatible with the old one, as explained below.
>>
>> Stepping back a bit, the traditional method for building flat shared
>> libraries does not allow either the libraries or the executable to have
>> constructors and destructors:
>>
>> http://www.ucdot.org/article.pl?sid=03/11/25/1126257&mode=thread
>
> Could you run over how the constructots/destructors are broken in the
> current arrangement used by the uClinux-dist. Myself and a couple
> of others are fairly certain that they were working when we were doing
> m68k on a daily basis.
>
> I won't argue that the uClibc support for flat shared libs needs some
> work though :-)
What link lines do you use? If you use the ones above, then both
executables and shared libraries are compiled with -nostartfiles,
so you don't get crti.o, crtbegin.o, crtend.o and crtn.o linked in.
That means no _init, _fini, register_frame_info, etc. If it works
for you, then I imagine you're using something slightly different
to what's given in the uCdot article. Either that or I'm missing
something ;)
Do you support constructors and destructors in shared libraries as
well as executables? I couldn't see how that was supposed to work
with the uClinux-dist setup. Can you also throw exceptions within
shared libraries, and from shared libraries to executables?
Richard
More information about the uClibc
mailing list