This Time Self-Hosted
dark mode light mode Search

Playing with visibility, once more

Okay, so I decided that now that GCC supports visibility almost decently (although there are a few ways to f* it up with #pragmas), it’s a good moment to start playing with it a bit more to have a bit of improvements here and there.

My first step was obvious, considering what I work on mostly: making ffmpeg respect it 🙂

The patch was non trivial, also because #pragmas are broken, but it’s done and I sent it to lu_zero so he can validate it. A part the performance improvement, it also helps developer to know what they are leaving available to other software. Luckily xine worked fine with it without problems, but VLC needed a patch because it was relying on two internal symbols. The patch now is in patchset 21 in portage.

Update (2017-04-22): there used to be a reference to my overlay for the patch here. The patch is gone and so has my overlay, so I removed the whole section.

I also decided to get a look at adding support to flac for the visibility, luckily this was really simple as upstream already handles visibility for Windows DLL, so I just needed to add a few logics and remove a test that is broken (relies on internal symbols), and now it works, yuhuu… there’s not a huge reduction of symbols, but it’s still something.

I’ll send it upstream now and add a new revision to portage later.

Unfortunately my hacking at this is limited to the free time I have while I think of what preparing for the course, until after the course (and even after if I find another job to work on), so don’t count on much improvement about this fin a short term.

My next target is libmodplug, just because it’s C++ and the symbols reduction might be drastic. being not a wrapper like libFLAC++ but a full featured C++ library, but it also means the work is harder.

Well, time to work, as the night was a bit… sad from a side :/ oh well.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.