public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Archive members in input section descriptions?
@ 2007-07-27  9:59 Reto Hermann
  2007-09-27  1:00 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Reto Hermann @ 2007-07-27  9:59 UTC (permalink / raw)
  To: binutils

I have a library archive libfoo.a containing members bar1.o and bar2.o. This
library is provided to me, i.e., I do not build it myself.
I would like to link the archive members bar1.o and bar2.o such, that they
end up in different segments of the ELF executable, e.g., bar1.o in .text
(which resides in ROM) and bar2.o in .text.fast (which resides in RAM). 

Is this possible? How would the input section descriptions for bar1.o and
bar2.o in .text and .text.fast look like?

Reto Hermann


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Archive members in input section descriptions?
  2007-07-27  9:59 Archive members in input section descriptions? Reto Hermann
@ 2007-09-27  1:00 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2007-09-27  1:00 UTC (permalink / raw)
  To: Reto Hermann; +Cc: binutils

Hi Reto,

> I have a library archive libfoo.a containing members bar1.o and bar2.o. This
> library is provided to me, i.e., I do not build it myself.
> I would like to link the archive members bar1.o and bar2.o such, that they
> end up in different segments of the ELF executable, e.g., bar1.o in .text
> (which resides in ROM) and bar2.o in .text.fast (which resides in RAM). 
> 
> Is this possible?

Yes, but you have to either extract the object files from the archive first and 
then refer to them directly by name in the linker scripts.

> How would the input section descriptions for bar1.o and
> bar2.o in .text and .text.fast look like?

Like this:

    SECTIONS
    {
       .text { *(EXCLUDE_FILE (*bar2.o) .text) }
       .text.fast { *(.text) }
    }

Cheers
   Nick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-26 17:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-27  9:59 Archive members in input section descriptions? Reto Hermann
2007-09-27  1:00 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).