Software Convention Proposal
Jakub Jelinek
jakub@redhat.com
Wed Aug 21 13:08:00 GMT 2002
On Wed, Aug 21, 2002 at 12:03:34PM -0700, Richard Henderson wrote:
> A problem area, however, are third-party libraries. In that
> case, given that we cannot modify the headers, the best we can
> do is create a list of the symbols that should be bound a
> particular way and present it to the compiler through some side
> channel. E.g. a file associated with a command line switch.
>
> > -fprotected -fdefault <file>
>
> I'm not thrilled about using the same switch to mean two
> different things. Certainly you couldn't just leave the
> filename unassociated like that. So at minimum you'd need
>
> -fprotected -fdefault=<file>
>
> But I'd prefer switches that differed slightly. Perhaps
>
> -fvisibility=protected
> -fvisibility-default=<file>
>
> I'd like input from others on this.
How is this different from just sourcing another header with
#define H(x) extern __typeof(x) x __attribute__((visibility("hidden")));
H(foo)
H(bar)
H(baz)
? The only difference I can think of is if the headers then define
macros with the same names as the functions...
Jakub
More information about the Gcc
mailing list