This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
simulating section-gc with ar-archives?
- From: Adam Megacz <adam at megacz dot com>
- To: binutils at sources dot redhat dot com
- Date: 16 Jan 2002 11:20:12 -0800
- Subject: simulating section-gc with ar-archives?
- Organization: Myself
If I understand correctly, ld will ignore any unreferenced .o's in an
ar-archive when linking. So if foo.a contains bar.o and baz.o, and
baz.o is never referenced, baz.o will not be included in the final
executable.
Does this mean that you could simulate section-gc by breaking all your
.o's up so that each file contained exactly one section, wrapping it
all up in a .a, and linking that?
I'm trying to get section-gc to work on win32/PE.
- a