Does -gc-section (garbage collection) works only with static linking ?
Dave Korn
dk@artimi.com
Wed Sep 8 11:32:00 GMT 2004
> -----Original Message-----
> From: Valery Pykhtin
> Sent: 08 September 2004 12:25
> Hi Dave,
>
> Its getting more and more interesting :)
>
> > > (i386 Intel syntax)
> > >
> > > mov eax,myfxptr
> > > ...
> > > call [eax] // in user's program
> > >
> > > Does GCC compiler tells the linker in this case that myfx
> is called ?
> >
> > The linker will find a reloc pointing at the "mov eax" instruction
> above,
> > and so can deduce that myfx is referred to and knows not to
> discard it.
>
> So what is the problem with pointers to functions that are passed to
> external dynamic library? The linker could still find these
> relocates and
> consider not to discard these functions?
>
> Best regards,
> Valery
I didn't really follow Nick's argument, and since Alan points out that it
has been implemented, I guess it must be possible after all.
cheers,
DaveK
--
Can't think of a witty .sigline today....
More information about the Binutils
mailing list