This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
how to link a section in specific .o inside .a via linker script?
- From: mat at lcs dot mit dot edu
- To: binutils at sourceware dot org
- Date: 12 Jan 2007 14:05:41 -0500
- Subject: how to link a section in specific .o inside .a via linker script?
I am creating a linker script to place sections at exactly the
addresses I want them.
In a linker script it is easy to link in just a section from
a specific .o file, like this:
.text : { bar.o(.text) }
However, I want a specific section from a specific .o file that is
inside a specific .a file. Naively, given the textual format used to
describe archive members in -Map files, I hoped this would work:
.text : { /lib/libc.a(bar.o)(.text) }
But it doesn't parse. I can't seem to figure out a way to name just
this one section in that .o file in the archive.
Is this possible? Thanks!
-Mat