GNOME Bugzilla – Bug 741069
[review] add versioning to linker script (version-script) for libnm [th/libnm-version-script-bgo741069]
Last modified: 2014-12-05 11:00:53 UTC
Before we release 1.0, we should add versioning to the linker script for libnm. Discussing with danw, it seems that this is not necessary for libnm-util/libnm-glib.
branch th/libnm-version-script-bgo741069
> contrib/rpm: ignore libgsystem/ repository in build_clean.sh > cli: g_strdup(NULL) returns NULL; simplify code for that These don't seem to belong on this branch? > build: adjust tools/check-exports.sh I assume you've tested that your changes work if you move some symbols into another section? > # Have to prefix with a tab and suffix with a ';' to match .ver file format That comment is both backwards and in the wrong place now. (You now strip out the tab and ';' in get_syms_from_def() rather than adding them in get_syms().) > libnm/build: add versioning to linker script Semantically it seems like the "local: *;" should be in a separate section? (You can only have one "*", and logically, private symbols we add later shouldn't be part of "libnm_1_0_0".) And from reading the info page, it seems like "global:" is the default and doesn't need to be explicitly specified, so you could drop that.
(In reply to comment #2) > > contrib/rpm: ignore libgsystem/ repository in build_clean.sh > > cli: g_strdup(NULL) returns NULL; simplify code for that > > These don't seem to belong on this branch? no, they don't :) > > build: adjust tools/check-exports.sh > > I assume you've tested that your changes work if you move some symbols into > another section? Yes, it tested successfully. > > # Have to prefix with a tab and suffix with a ';' to match .ver file format > > That comment is both backwards and in the wrong place now. (You now strip out > the tab and ';' in get_syms_from_def() rather than adding them in get_syms().) fixed. > > libnm/build: add versioning to linker script > > Semantically it seems like the "local: *;" should be in a separate section? > (You can only have one "*", and logically, private symbols we add later > shouldn't be part of "libnm_1_0_0".) Systemd has (and keeps) the local part with the oldest section: http://cgit.freedesktop.org/systemd/systemd/plain/src/libsystemd/libsystemd.sym.m4 but how about: __libnm_local { local: »···*; }; I pushed a fixup with that. OK? > And from reading the info page, it seems like "global:" is the default and > doesn't need to be explicitly specified, so you could drop that. I'd prefer explicit. Ok? rebased and pushed.
(In reply to comment #3) > __libnm_local { > I pushed a fixup with that. OK? Yes > > And from reading the info page, it seems like "global:" is the default and > > doesn't need to be explicitly specified, so you could drop that. > > I'd prefer explicit. Ok? I'm fine either way, but presumably if we say it in libnm_1_0_0, we also ought to say it into libnm_1_2_0 for consistency, etc, so there will eventually end up being lots of "global:"s. (Well, for small values of "lots" :)
LGTM
merged as http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=490eb51f0a88a10abecd4f180f9bc9bed72163e1