trying to understand the link process

Guest #1171701
Rate this post
• ▲ 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?
Guest #1171702
Rate this post
• ▲ 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_projects/index_at91.html#at91uart
Please check the AT91SAM7 "gamma"-example from the same page too -
newer, more options.

Martin Thomas

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.