FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 09-20-2012, 03:34 PM
Mathieu Malaterre
 
Default symbols file: To hide or not to hide...

Hi,

So I finally managed to get my C++ symbols file generated. However
before shooting myself in the foot, I'd like to know if I need to
generate the symbol file using -fvisibility=hidden or not ? The output
of pkgkde-gensymbols/pkgkde-symbolshelper[1] seems to be drastically
affected by having/not having this compiler flag.
I could not find any explanation in §8.6

Here is my d/rules when using hidden flag:

#!/usr/bin/make -f
[...]
export DEB_CFLAGS_MAINT_APPEND=-fvisibility=hidden
export DEB_CXXFLAGS_MAINT_APPEND=-fvisibility=hidden


Thanks !
-M
[1] http://www.eyrie.org/~eagle/journal/2012-01/008.html


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CA+7wUsyOsEZ+hQtt2kjNzCW9EaFEdaaxWF=LExeBZq6qJjbqw Q@mail.gmail.com
 
Old 09-20-2012, 04:59 PM
Andrey Rahmatullin
 
Default symbols file: To hide or not to hide...

On Thu, Sep 20, 2012 at 05:34:36PM +0200, Mathieu Malaterre wrote:
> So I finally managed to get my C++ symbols file generated. However
> before shooting myself in the foot, I'd like to know if I need to
> generate the symbol file using -fvisibility=hidden or not ?
Theoretically, it is much better to export only those symbols you (as the
upstream) actually intend to. Benefits vary from shortening the exports
table to clearly defining the ABI. But if you do that incorrectly,
problems may arise, so it may be better to not do that, especially if you
are not the upstream.

See also http://gcc.gnu.org/wiki/Visibility

--
WBR, wRAR
 
Old 09-20-2012, 08:16 PM
Lisandro Damián Nicanor Pérez Meyer
 
Default symbols file: To hide or not to hide...

On Thu 20 Sep 2012 13:59:52 Andrey Rahmatullin escribió:
> On Thu, Sep 20, 2012 at 05:34:36PM +0200, Mathieu Malaterre wrote:
> > So I finally managed to get my C++ symbols file generated. However
> >
> > before shooting myself in the foot, I'd like to know if I need to
> > generate the symbol file using -fvisibility=hidden or not ?
>
> Theoretically, it is much better to export only those symbols you (as the
> upstream) actually intend to. Benefits vary from shortening the exports
> table to clearly defining the ABI. But if you do that incorrectly,
> problems may arise, so it may be better to not do that, especially if you
> are not the upstream.

On the other side, in the pkg-kde team we do use fvisibility=hidden.
Yes, upstream may have an error. But normally in those cases means missing
symbols and stuff that depend on your lib will FTBFS, so it's quite easy to
check.

Adding a symbol later is much easier than removing one (which normally means a
soname change).

P.S.: I am not *very* knowledgeable about this, so if anyone feels that I0m
missing something do not heasitate in fixing it

Kinds regards, Lisandro.

--
"Los pibes no piden que levantemos un muro para que tengan un límite,
sino que los ayudemos a crecer en libertad."
Padre Bergoglio - http://www.lanacion.com.ar/1153060

Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/
 

Thread Tools




All times are GMT. The time now is 08:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org