diff mbox

libsepol: Add symver with explicit version to build with ld.gold

Message ID 1477929147-18929-1-git-send-email-jason@perfinion.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Jason Zaman Oct. 31, 2016, 3:52 p.m. UTC
The blank default symver fails to compile with ld.gold. This updates the
symver from blank to LIBSEPOL_1.0. The dynamic linker will first look
for the symbol with the explicit version specified. If there is none, it
will pick the first listed symbol so there is no breakage.
This also matches how symvers are defined in libsemanage.

Signed-off-by: Jason Zaman <jason@perfinion.com>
---
 libsepol/cil/src/cil.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Stephen Smalley Oct. 31, 2016, 4:52 p.m. UTC | #1
On 10/31/2016 11:52 AM, Jason Zaman wrote:
> The blank default symver fails to compile with ld.gold. This updates the
> symver from blank to LIBSEPOL_1.0. The dynamic linker will first look
> for the symbol with the explicit version specified. If there is none, it
> will pick the first listed symbol so there is no breakage.
> This also matches how symvers are defined in libsemanage.

Thanks, applied.

> 
> Signed-off-by: Jason Zaman <jason@perfinion.com>
> ---
>  libsepol/cil/src/cil.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/libsepol/cil/src/cil.c b/libsepol/cil/src/cil.c
> index 929ab19..9b18773 100644
> --- a/libsepol/cil/src/cil.c
> +++ b/libsepol/cil/src/cil.c
> @@ -53,19 +53,19 @@
>  #include "dso.h"
>  
>  #ifndef DISABLE_SYMVER
> -asm(".symver cil_build_policydb_pdb,        cil_build_policydb@");
> +asm(".symver cil_build_policydb_pdb,        cil_build_policydb@LIBSEPOL_1.0");
>  asm(".symver cil_build_policydb_create_pdb, cil_build_policydb@@LIBSEPOL_1.1");
>  
> -asm(".symver cil_compile_pdb,   cil_compile@");
> +asm(".symver cil_compile_pdb,   cil_compile@LIBSEPOL_1.0");
>  asm(".symver cil_compile_nopdb, cil_compile@@LIBSEPOL_1.1");
>  
> -asm(".symver cil_userprefixes_to_string_pdb,   cil_userprefixes_to_string@");
> +asm(".symver cil_userprefixes_to_string_pdb,   cil_userprefixes_to_string@LIBSEPOL_1.0");
>  asm(".symver cil_userprefixes_to_string_nopdb, cil_userprefixes_to_string@@LIBSEPOL_1.1");
>  
> -asm(".symver cil_selinuxusers_to_string_pdb,   cil_selinuxusers_to_string@");
> +asm(".symver cil_selinuxusers_to_string_pdb,   cil_selinuxusers_to_string@LIBSEPOL_1.0");
>  asm(".symver cil_selinuxusers_to_string_nopdb, cil_selinuxusers_to_string@@LIBSEPOL_1.1");
>  
> -asm(".symver cil_filecons_to_string_pdb,   cil_filecons_to_string@");
> +asm(".symver cil_filecons_to_string_pdb,   cil_filecons_to_string@LIBSEPOL_1.0");
>  asm(".symver cil_filecons_to_string_nopdb, cil_filecons_to_string@@LIBSEPOL_1.1");
>  #endif
>  
>
diff mbox

Patch

diff --git a/libsepol/cil/src/cil.c b/libsepol/cil/src/cil.c
index 929ab19..9b18773 100644
--- a/libsepol/cil/src/cil.c
+++ b/libsepol/cil/src/cil.c
@@ -53,19 +53,19 @@ 
 #include "dso.h"
 
 #ifndef DISABLE_SYMVER
-asm(".symver cil_build_policydb_pdb,        cil_build_policydb@");
+asm(".symver cil_build_policydb_pdb,        cil_build_policydb@LIBSEPOL_1.0");
 asm(".symver cil_build_policydb_create_pdb, cil_build_policydb@@LIBSEPOL_1.1");
 
-asm(".symver cil_compile_pdb,   cil_compile@");
+asm(".symver cil_compile_pdb,   cil_compile@LIBSEPOL_1.0");
 asm(".symver cil_compile_nopdb, cil_compile@@LIBSEPOL_1.1");
 
-asm(".symver cil_userprefixes_to_string_pdb,   cil_userprefixes_to_string@");
+asm(".symver cil_userprefixes_to_string_pdb,   cil_userprefixes_to_string@LIBSEPOL_1.0");
 asm(".symver cil_userprefixes_to_string_nopdb, cil_userprefixes_to_string@@LIBSEPOL_1.1");
 
-asm(".symver cil_selinuxusers_to_string_pdb,   cil_selinuxusers_to_string@");
+asm(".symver cil_selinuxusers_to_string_pdb,   cil_selinuxusers_to_string@LIBSEPOL_1.0");
 asm(".symver cil_selinuxusers_to_string_nopdb, cil_selinuxusers_to_string@@LIBSEPOL_1.1");
 
-asm(".symver cil_filecons_to_string_pdb,   cil_filecons_to_string@");
+asm(".symver cil_filecons_to_string_pdb,   cil_filecons_to_string@LIBSEPOL_1.0");
 asm(".symver cil_filecons_to_string_nopdb, cil_filecons_to_string@@LIBSEPOL_1.1");
 #endif