[RFC/proto-PATCH] Enable basic ELF version script support on PE targets?
Dave Korn
dave.korn.cygwin@googlemail.com
Thu Apr 30 14:37:00 GMT 2009
Hi gang,
The current behaviour of LD is to accept and parse ELF version scripts
everywhere, ignoring their presence on non-ELF platforms.
The attached (prototype, as no NEWS or docs or tests) patch demonstrates how
trivially easy it would be to support using ELF version scripts on PE targets
in order to filter the list of symbols during auto-export-everything mode.
It makes no attempt at doing any actual versioning; it solely controls which
symbols get exported. It also currently only filters out; the distinction is
subtle in auto-export mode, but for example you wouldn't be able to use it to
add back one of the symbols that gets autofiltered from the list of exports.
Would this support be useful? I'm bootstrapping GCC with it right now,
having already proved to my satisfaction that it DTRT during a libgcj DLL build.
Note that I haven't made the behaviour subject to a command-line option, and
I would really very much rather not, for several reasons, the prime one being
that supplying a command-line option just to cancel the effects of another one
that the user wishes they hadn't passed in the first place seems nuts! I also
expect that it should silently DTRT almost everywhere that currently is
passing ELF version scripts to non-ELF-targeted links in any case, but maybe
that's my lack of imagination. In any case, I felt I ought to point out that
this would be a significant change to the default behaviour so that interested
parties can give it due consideration.
If the other PE targets don't like the idea, I could always make it
Cygwin-only, but I think it'll be useful to everyone, so I haven't done that
in this draft. Opinions please? (If I don't hear back I'll assume nobody is
that bothered and go ahead with a formal submission).
cheers,
DaveK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pe-ver-script-support.diff
Type: text/x-c
Size: 7441 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090430/36b2f319/attachment.bin>
More information about the Binutils
mailing list