> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of David McCullough
> Sent: Thursday, 6 September 2007 8:09 AM
> To: uClinux development list
> Subject: Re: [uClinux-dev] Re: shared libraries on coldfire 
> with codesourcerytoolchain
> 
> 
> > There definitely was a 3.something version working, 
> > Bernardo Innocenti merged my modifications forwards and got 
> > them integrated into the compiler proper.
> 
> Yes,  but I still recall that only 2.95.3 support working shared libs.
> That Bernardo 3.X toolchain is still on uClinux.org,
> 

We are using that 3.X version that you are talking about (Bernardo's 3.4.3)
successfully with shared libraries.

It's on my ever-growing list of "Things To Do" to get us forward onto the
GCC 4.x line... someday... Real Soon Now(TM)

So I can't comment as to whether the 4.x series works, but the 3.4.3 on
uClinux.org does.

We did have a problem with C++ programs and shared libraries at some stage
due to linking issues and we came up with this patch to the 3.4.3 source.

--- binutils-2.15.94.0.1/ld/ldlang.c    2004-11-23 06:33:32.000000000 +1000
+++ binutils-2.15.94.0.1-new/ld/ldlang.c        2005-11-08
15:51:51.000000000 +1000
@@ -4832,7 +4832,7 @@
   /* Find any sections not attached explicitly and handle them.  */
   lang_place_orphans ();

-  if (! link_info.relocatable)
+  if (! link_info.relocatable && !config.build_constructors)
     {
       asection *found;


In my original post to this list about this patch I said:
"Bear in mind that if you are using one of the newer linkers that fully
support merged sections you will always have this problem if you are using
the uClinux/elf2flt mechanism when linking with any objects/libraries that
were not built using the "no-merge-constants" flag, because they will not
line up with their relocatable counterpart files.

And that goes for *all* of the files you are linking in, e.g. don't forget
you will have to rebuild libgcc etc. with no-merge-constants.

We found that all way too painful here, so we've patched the linker so that
linking with -Ur also causes merging (so this lines up with the .gdb
absolutely linked file which does merging).

This seems to be working for us so far (fingers crossed)."


And it has kept working for us.... So far.. :)

Hope this helps.

Paul McGougan
Braintree Communications Pty Ltd
-- 
This information together with any attachments is for the use of the
intended recipient(s) only and may contain confidential and/or privileged
information and is subject to copyright. If you have received this email in
error please inform the sender as quickly as possible and delete this email
and any copies of this information from your computer system network. If you
are not the intended recipient of this email, you must not copy, distribute
or take any action(s) that relies on this information. Any form of
disclosure, modification, distribution and/or publication of this email is
strictly prohibited. 

_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to