* Small? request for ld --gc-sections
@ 2001-08-15 8:57 Etienne Lorrain
2001-08-15 14:40 ` Alan Modra
0 siblings, 1 reply; 3+ messages in thread
From: Etienne Lorrain @ 2001-08-15 8:57 UTC (permalink / raw)
To: binutils
Hello,
If it is not too difficult, it would be nice to not consider a symbol
in the linker script as referenced - in the sense of gc-section - if it
is just a renaming.
I have at the end of my linker file:
library_sprintf = sprintf ;
And in one configuration, the symbol "library_sprintf" is not used,
"sprintf" is not used neither, but the function "sprintf" is included
in the link (ld --gc-section) because of this linker line.
I tried something like:
PROVIDE (library_sprintf = sprintf) ;
but have the same result.
Thanks,
Etienne.
___________________________________________________________
Do You Yahoo!? -- Vos albums photos en ligne,
Yahoo! Photos : http://fr.photos.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Small? request for ld --gc-sections
2001-08-15 8:57 Small? request for ld --gc-sections Etienne Lorrain
@ 2001-08-15 14:40 ` Alan Modra
2001-08-16 3:26 ` Etienne Lorrain
0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2001-08-15 14:40 UTC (permalink / raw)
To: Etienne Lorrain; +Cc: clm, binutils
On Wed, Aug 15, 2001 at 05:57:14PM +0200, Etienne Lorrain wrote:
>
> I have at the end of my linker file:
> library_sprintf = sprintf ;
> And in one configuration, the symbol "library_sprintf" is not used,
> "sprintf" is not used neither, but the function "sprintf" is included
> in the link (ld --gc-section) because of this linker line.
I can't reproduce this behaviour. ie. I can reference a function in the
linker script via an assignment, and have the function removed. Are you
sure garbage collection is being done at all? Note that if linking
against a shared lib, gc won't run.
Mon Oct 5 10:06:22 1998 Catherine Moore <clm@cygnus.com>
* elflink.h (elf_gc_sections): Do not allow garbage
collection if dynamic sections have been created.
I'm not sure why there is this restriction. Catherine?
Alan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Small? request for ld --gc-sections
2001-08-15 14:40 ` Alan Modra
@ 2001-08-16 3:26 ` Etienne Lorrain
0 siblings, 0 replies; 3+ messages in thread
From: Etienne Lorrain @ 2001-08-16 3:26 UTC (permalink / raw)
To: Alan Modra; +Cc: clm, binutils
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
--- Alan Modra <amodra@bigpond.net.au> a écrit :
> On Wed, Aug 15, 2001 at 05:57:14PM +0200, Etienne Lorrain wrote:
> >
> > I have at the end of my linker file:
> > library_sprintf = sprintf ;
> > And in one configuration, the symbol "library_sprintf" is not used,
> > "sprintf" is not used neither, but the function "sprintf" is included
> > in the link (ld --gc-section) because of this linker line.
>
> I can't reproduce this behaviour. ie. I can reference a function in the
> linker script via an assignment, and have the function removed. Are you
> sure garbage collection is being done at all?
Really sorry, my fault: Garbage collection was not enabled in this
configuration - my Makefile is a bit too complex.
Thanks,
Etienne.
___________________________________________________________
Do You Yahoo!? -- Vos albums photos en ligne,
Yahoo! Photos : http://fr.photos.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-08-16 3:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-15 8:57 Small? request for ld --gc-sections Etienne Lorrain
2001-08-15 14:40 ` Alan Modra
2001-08-16 3:26 ` Etienne Lorrain
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).