Forum: ARM programming with GCC/GNU tools trying to understand the link process

 Author: outer_space (Guest) Posted on: 2006-09-05 18:03

Rate this post
 0 ▲ useful ▼ not useful
Here are some excerpts from my .map file.  I'm using Cstartup.S v1.1
from atmel and Cstartup_SAM7.c v1.3 also from atmel.

*(.glue_7t)
*(.glue_7)
0x00005e18                . = ALIGN (0x4)

What is in the .glue_7t and .glue_7 sections?  Where do they come from,
why are they there, what documentation is it described in?

Also I have an unrelated question about the mthomas hello world example.
Why does #include "lib_AT91SAM7S64.h" have to be commented out?  I see
that functions from this library are used but they are declared in the
board.h file by copy/pasting from lib_AT91SAM7S64.h.  Why didnt he just
include the library header rather than copy the declarations into
another file?

 Author: Martin Thomas (Guest) Posted on: 2006-09-05 22:48

Rate this post
 0 ▲ useful ▼ not useful
outer_space wrote:
> Here are some excerpts from my .map file.  I'm using Cstartup.S v1.1
> from atmel and Cstartup_SAM7.c v1.3 also from atmel.
>
> *(.glue_7t)
> *(.glue_7)
>                 0x00005e18                . = ALIGN (0x4)
>
> What is in the .glue_7t and .glue_7 sections?  Where do they come from,
> why are they there, what documentation is it described in?

As far as I know at least the interface-functions for interworking
generated internaly are placed in the glue-sections. It should be
documented in the binutils/ld-manual but I'm not sure. Also see the file
elf32-arm.c from the GNU binutils sources.

> Also I have an unrelated question about the mthomas hello world example.
> Why does #include "lib_AT91SAM7S64.h" have to be commented out?  I see
> that functions from this library are used but they are declared in the
> board.h file by copy/pasting from lib_AT91SAM7S64.h.  Why didnt he just
> include the library header rather than copy the declarations into
> another file?

I guess you mean the at91sam7s64_uart_simple-example. Yes, this has not
been well done - it's from the days when I started playing around with
the SAM7-eval-board. I have done some small updates now and the
"redundant" code has been removed, see
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm...
Please check the AT91SAM7 "gamma"-example from the same page too -

Martin Thomas

• $formula (LaTeX syntax)$