This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Hide autogenerated symbols when linking shared libraries


Hi Yuri,

> Ok, fair enough.  Still let me point out that presently these symbols
> pollute binary interfaces of any shared library compiled with default
> flags by GNU/LLVM tools.

Is it really a big problem though ?  I would imagine that the amount of
space used by these symbols is trivial compared to the size of the rest
of any typical shared library.


> Do you have any particular uses in mind?  I tried grepping glibc,
> binutils-gdb or libgcc for bss_start but couldn't find anything which
> would justify them having default visibility...

Not really - I was just speaking in generalities.  It may well turn out
that for, say x86_64 Linux based systems, these symbols are not needed.
But I would be very wary of removing them without a lot of testing first
as this is exactly the kind of thing that can break systems in unexpected,
and unanticipated ways.


>> PS.  You can always create your own linker script which does not define
>> these symbols...
> 
> Thanks but I'm more worried about distros (I came across them while
> investigating redundant symbols exported by Debian packages).  Asking
> every package maintainer to use -Wl,--version-script won't scale very
> well...

True. :-)  Although some distros due do use special packages that provide
the default linker command line options when building applications (and
libraries).  EG Fedora's redhar-rpm-config package.  So you could make a 
change only in this package and have it affect most apps.

Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]