I'm trying to place libc functions like memcpy
, memset
etc in specific sections of memory.
I tried doing smth like this:
.section1
{
/path/to/libc.a
otherobj.o
}
.section2
{
*(.text)
}
.section3
{
*(.data .bss)
}
using gcc's ld tool with this script and the -map option, I check out the mapfile generated and see that memcpy
and other symbols still appear in sections 2 and 3.
WORKAROUND:
Finally i just extracted the lib file to its collection of object files and placed them individually where i liked.