Hint Wanted on Debugging Unexpected Section

Joel Sherrill joel at rtems.org
Mon Jul 4 18:33:53 UTC 2016


On Mon, Jul 4, 2016 at 1:07 PM, Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> Hello Joel,
>
> please use the linker command files of the qoriq BSPs as a template on
> PowerPC.
>
>
psim is using the shared linkcmds. Is something wrong with it?

What would be the advantage of the qoriq linker script if both are using
the shared pattern?

Just curious. I was avoiding the cut and pasted ones like the plague. But
if there is a second factor, we all should know it.


> You can use the linker map file to figure out which sections a the trouble
> maker (-Wl,-Map,map.txt).
>
>
Hmm... there were these... any ideas?

Thanks.

.unexpected_sections
                0x00000000       0xa8
 *(*)
 .rela.rtemsroset._Sysinit.content.0.0x00030080
                0x00000000        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00040180
                0x0000000c        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00070680
                0x00000018        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00010080
                0x00000024        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00020080
                0x00000030        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00060080
                0x0000003c        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00034580
                0x00000048        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00034080
                0x00000054        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00030280
                0x00000060        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00038080
                0x0000006c        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00070180
                0x00000078        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00040080
                0x00000084        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00080080
                0x00000090        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .rela.rtemsroset._Sysinit.content.0.0x00036b80
                0x0000009c        0xc
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/ecrti.o
 .tm_clone_table
                0x000000a8        0x0
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/crtbegin.o
 .tm_clone_table
                0x000000a8        0x0
/home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/m603e/crtend.o
                0x000000a8                __TMC_END__




> ----- Am 4. Jul 2016 um 19:57 schrieb Joel Sherrill joel at rtems.org:
>
> > Hi
> >
> > I have an unexpected section error on linking a BSP. It is a new BSP but
> > development is early so I am using a direct copy of psim's linkcmds.
> >
> >
> /home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/../../../../powerpc-rtems4.12/bin/ld:
> > hello.exe section `.unexpected_sections' will not fit in region
> > `UNEXPECTED_SECTIONS'
> >
> /home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/../../../../powerpc-rtems4.12/bin/ld:
> > section .unexpected_sections loaded at [00000000,000000a7] overlaps
> section
> > .text loaded at [00000000,0001fc97]
> >
> /home/joel/rtems-4.11-work/tools/4.12/lib/gcc/powerpc-rtems4.12/6.1.1/../../../../powerpc-rtems4.12/bin/ld:
> > region `UNEXPECTED_SECTIONS' overflowed by 169 bytes
> > collect2: error: ld returned 1 exit status
> >
> > Any help in narrowing down the unknown is appreciated.
> >
> > I wonder whether the unexpected will be something scary like a ghost
> > or pleasant like a long lost friend or USD20 on the ground. :)
> >
> > --joel
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20160704/6c65d0f8/attachment-0002.html>


More information about the devel mailing list