Linker question. How to change memory section for functions that comes from a ".a" library?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a program that uses some functions in libgcc (automatically inferred
mult, div, etc..)
My program is divided into a boot sector and an application sector, and i
want those libgcc functions to end up in the boot section.
I know how to map custom made functions to different memory areas, using
e.g:

__attribute__((section(".bootsection"))) int mybootfunc();

and tell the linker script something like:

.bootsection:
{
   *(.bootsection)
} > MEM_BOOT_AREA

and if you want to map the functions from e.g. "my_obj.o" file to that same
area you can add it like:

.bootsection:
{
   my_obj.o
   *(.bootsection)
} > MEM_BOOT_AREA


But when it comes to functions that reside in a library ("libgcc.a") i have
no clue. I have tried to add "libgcc.a" in the same way as the ".o" file
above. The linker does not complain then, but it has no effect.

So the question is:
How do i tell the linker to put the needed libgcc functions in a special
memory section.
I have searched a LOT before asking this, so now i give this list a chance.
(Forgive any newbieness in mailing list etiquette, since I am not used to
mailing lists.)

regards Olof Andersson, Sweden
-- 
View this message in context: http://old.nabble.com/Linker-question.-How-to-change-memory-section-for-functions-that-comes-from-a-%22.a%22-library--tp30365738p30365738.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux