Cotix/cReddit — pull request #32 by DSMan195276 (2013-10-04 15:33:14+00:00)
Title: Strip unneeded symbols from libreddit

This patch fixes an issue with libreddit, in that it was exporting symbols which weren't part of the libraries API. The problem was that some functions are used across multiple files, so they need to be left global while linking happens, but after they are combined into libreddit.a they can be stripped off. Before, I couldn't find a good way to do it, so I've settled with using objcopy to strip the symbols for us (I was unable to get either ld or strip to do it). objcopy does it by looking at a list of all the symbols we want global, and then making all the other symbols local.

Personally, I'm not 100% satisfied with this, but it's better then the alternative. objcopy seems to be a bit more uncommon of a program then strip or ld, so if anybody knows how to do it with strip or ld I'd rather do it that way.(It's only a build dependency though, so It's not really that big of a deal)