Commit Graph

4 Commits

Author SHA1 Message Date
Thomas Haller
337af71720 build/trivial: reorder symbols in linker version scripts and add comment
We export some symbols that are in private headers. We shouldn't do
that. Highlight them in the version script by grouping them and add
a comment.

We might want to hide these symbols later.

Some of these symbols symbols are used by libnl internal libraries.
So removing those is more complicated and only possible if we don't
required compatibility of different libnl libraries between each other
(i.e. that we require that within one installation the library versions
match).

Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-03-04 17:41:45 +01:00
Thomas Haller
4280dfb85d build: don't export internal symbols
Hide internal symbols from the libraries.
Before, all symbols were exported, including some that were
not meant to be public. Hide them now.

This is an ABI break, but nobody was supposed to use these symbols.
Hence it seems acceptable to hide them now.

Still don't hide any symbols that are internal, but wrongly exported
in public header files (such as @ct_obj_ops).

Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-02-02 17:28:06 +01:00
Thomas Haller
113bb85acf build: explicitly list exported symbols in linker scripts
Before all symbols (global: *;) were exported, which included some
symbols that should not be exported. Update the symbol files to
exclude everything by default and name the exported symbols
explicitly.

Still the same symbols as before are exported.

    for SO in ./lib/.libs/*.so ./src/lib/.libs/*.so; do
        SYM="$(basename "$SO")"
        SYM="${SYM%.so}.sym"
        cat <<EOF | sed 's/^ *>> //' > "$SYM"
            >> libnl_3 {
            >> global:
            >> $(nm "$SO" | sed -n 's/^[a-fA-F0-9]\+ [BDRT] \(.*\)/\t\1;/p' | LANG=C sort)
            >> local:
            >> $(echo -e '\t')*;
            >> };
    EOF
    done

Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-02-02 17:28:06 +01:00
Thomas Haller
e7d57da0dd build: add individual linker version scripts for shared libraries
Instead of using a shared version script 'libnl.sym', add individual
linker scripts for all libnl libraries.

For now, the content of the version script is unchanged and this
patch does not have any externally visible changes.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-02-02 17:28:06 +01:00