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]

Re: some question about output section


On Thu, May 05, 2011 at 11:00:01AM +0800, loody wrote:
>   .onlyText 0x80000000 : {  lib2.a:*.o (*.text)  }

So this tells ld where to put lib2.a object files,

> mipsel-linux-gnu-ld -Bstatic -T ./link.xn -o TEST_LINK.elf -Map
> TEST_LINK.map --oformat elf32-tradlittlemips lib2.a

and the above says to extract files from lib2.a if they satisfy
undefined references at the point where lib2.a is searched in the link
process.  That is the way archives work.  You don't have any other
object files or -u command line options, so no undefined symbol
references!  You'll need --whole-archive to have the entire contents
of the archive extracted.

-- 
Alan Modra
Australia Development Lab, IBM


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