Linking problem while building RTEMS-4.6.2 'pc386' under Cygwin

Joel Sherrill <joel@OARcorp.com> joel.sherrill at OARcorp.com
Tue Jan 25 16:40:52 UTC 2005


Mills, John M. wrote:
> Hello -
> 
> I expect this is a FAQ, but I just got bitten.
> 
> I built and installed 'i386-rtems' tools under Cygwin, then built
> RTEMS-4.6.2 for the 'pc386' BSP. It appeared to build the components
> successfully, but the build crashes when it tries to link the samples. There
> appears to be a conflict in 'linkcmds' mapping. My error message is:
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +++++++++++++++
> 
> 
>>>>>>>the target: <<<<<<
> 
> Making install in hello
> make[5]: Entering directory
> `/tmp/build/rtems/i386-rtems/c/pc386/tests/samples/hello'
> i386-rtems-gcc --pipe -B../../../../../lib/ -B../../../../../pc386/lib/
>  -specs bsp_specs -qrtems   -O4 -g -Wall -ansi -fasm
> -Wl,-Ttext,0x00100000
>  -o o-optimize/hello.obj o-optimize/init.o
> ../../../../../pc386/lib/no-dpmem.rel
>  ../../../../../pc386/lib/no-event.rel ../../../../../pc386/lib/no-msg.rel
>  ../../../../../pc386/lib/no-mp.rel ../../../../../pc386/lib/no-part.rel
>  ../../../../../pc386/lib/no-signal.rel
> ../../../../../pc386/lib/no-timer.rel
>  ../../../../../pc386/lib/no-rtmon.rel
> 
> 
>>>>>>and the error: <<<<<<
> 
> /opt/rtems-4.6/lib/gcc-lib/i386-rtems/3.3.5/../../../../i386-rtems/bin/ld:
>  section .bss [0011a140 -> 0011d26b] overlaps section .jcr [0011a140 ->
> 0011a143]
> collect2: ld returned 1 exit status
> make[5]: *** [o-optimize/hello.exe] Error 1
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +++++++++++++++


Not a FAQ but a recurring issue with different section names as gcc adds 
new sections.  :-)

This is a new section added with gcc 3.3.x.  The CVS trunk has this
patch to the linkcmds file:

$ diff -u 
/usr1/rtems/4.6-work/rtems/c/src/lib/libbsp/i386/pc386/startup/linkcmds 
/usr1/rtems/work/rtems/c/src/lib/libbsp/i386/pc386/startup/linkcmds
--- /usr1/rtems/4.6-work/rtems/c/src/lib/libbsp/i386/pc386/startup/linkcmds	
Thu Sep  4 13:44:04 2003
+++ /usr1/rtems/work/rtems/c/src/lib/libbsp/i386/pc386/startup/linkcmds 
Sun Jul 25 09:21:43 2004
@@ -28,7 +28,7 @@
  | *  http://www.rtems.com/license/LICENSE.
  | 
**************************************************************************
  |
-|  $Id: linkcmds,v 1.14.2.1 2003/09/04 18:44:04 joel Exp $
+|  $Id: linkcmds,v 1.16 2004/07/25 14:21:43 joel Exp $
 
+--------------------------------------------------------------------------*/


@@ -82,6 +82,7 @@
      *(.gnu.linkonce.r*)
      _erodata = ALIGN( 0x10 ) ;

+    *(.jcr)
      _etext = ALIGN( 0x10 ) ;
    }


> TIA for any guidance.
> 
> John M. Mills
> Staff Engineer
> EMS Technologies
> 660 Engineering Drive
> Norcross, GA 30092
> 770.263.9200 ext4882


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985




More information about the users mailing list