This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]