selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] libsepol: include module.c internal header in module_to_cil.c
@ 2019-06-24 19:31 Nicolas Iooss
  2019-06-25 16:00 ` William Roberts
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Iooss @ 2019-06-24 19:31 UTC (permalink / raw)
  To: selinux

In module_to_cil.c, sepol_ppfile_to_module_package() calls functions
from module.c without including the internal header. This makes building
libsepol with "gcc -flto -fuse-ld=gold" fails when linking libsepol.so:

    /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function
    sepol_ppfile_to_module_package: error: undefined reference to
    'sepol_module_package_free'
    /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function
    sepol_ppfile_to_module_package: error: undefined reference to
    'sepol_module_package_create'
    /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function
    sepol_ppfile_to_module_package: error: undefined reference to
    'sepol_module_package_create'
    collect2: error: ld returned 1 exit status

Fixes: https://github.com/SELinuxProject/selinux/issues/165

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 libsepol/src/module_to_cil.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libsepol/src/module_to_cil.c b/libsepol/src/module_to_cil.c
index da62c8aaf0ef..1af166c9abd0 100644
--- a/libsepol/src/module_to_cil.c
+++ b/libsepol/src/module_to_cil.c
@@ -54,6 +54,7 @@
 
 #include "kernel_to_common.h"
 #include "private.h"
+#include "module_internal.h"
 
 #ifdef __GNUC__
 #  define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] libsepol: include module.c internal header in module_to_cil.c
  2019-06-24 19:31 [PATCH 1/1] libsepol: include module.c internal header in module_to_cil.c Nicolas Iooss
@ 2019-06-25 16:00 ` William Roberts
  2019-06-26  6:54   ` Nicolas Iooss
  0 siblings, 1 reply; 3+ messages in thread
From: William Roberts @ 2019-06-25 16:00 UTC (permalink / raw)
  To: Nicolas Iooss; +Cc: selinux

ack, you going to to merge this?

On Mon, Jun 24, 2019 at 2:58 PM Nicolas Iooss <nicolas.iooss@m4x.org> wrote:
>
> In module_to_cil.c, sepol_ppfile_to_module_package() calls functions
> from module.c without including the internal header. This makes building
> libsepol with "gcc -flto -fuse-ld=gold" fails when linking libsepol.so:
>
>     /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function
>     sepol_ppfile_to_module_package: error: undefined reference to
>     'sepol_module_package_free'
>     /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function
>     sepol_ppfile_to_module_package: error: undefined reference to
>     'sepol_module_package_create'
>     /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function
>     sepol_ppfile_to_module_package: error: undefined reference to
>     'sepol_module_package_create'
>     collect2: error: ld returned 1 exit status
>
> Fixes: https://github.com/SELinuxProject/selinux/issues/165
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
> ---
>  libsepol/src/module_to_cil.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libsepol/src/module_to_cil.c b/libsepol/src/module_to_cil.c
> index da62c8aaf0ef..1af166c9abd0 100644
> --- a/libsepol/src/module_to_cil.c
> +++ b/libsepol/src/module_to_cil.c
> @@ -54,6 +54,7 @@
>
>  #include "kernel_to_common.h"
>  #include "private.h"
> +#include "module_internal.h"
>
>  #ifdef __GNUC__
>  #  define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
> --
> 2.22.0
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] libsepol: include module.c internal header in module_to_cil.c
  2019-06-25 16:00 ` William Roberts
@ 2019-06-26  6:54   ` Nicolas Iooss
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Iooss @ 2019-06-26  6:54 UTC (permalink / raw)
  To: William Roberts, selinux

On Tue, Jun 25, 2019 at 6:01 PM William Roberts
<bill.c.roberts@gmail.com> wrote:
>
> ack, you going to to merge this?

Yes, I merged it.

Thanks,
Nicolas

> On Mon, Jun 24, 2019 at 2:58 PM Nicolas Iooss <nicolas.iooss@m4x.org> wrote:
> >
> > In module_to_cil.c, sepol_ppfile_to_module_package() calls functions
> > from module.c without including the internal header. This makes building
> > libsepol with "gcc -flto -fuse-ld=gold" fails when linking libsepol.so:
> >
> >     /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function
> >     sepol_ppfile_to_module_package: error: undefined reference to
> >     'sepol_module_package_free'
> >     /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function
> >     sepol_ppfile_to_module_package: error: undefined reference to
> >     'sepol_module_package_create'
> >     /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function
> >     sepol_ppfile_to_module_package: error: undefined reference to
> >     'sepol_module_package_create'
> >     collect2: error: ld returned 1 exit status
> >
> > Fixes: https://github.com/SELinuxProject/selinux/issues/165
> >
> > Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
> > ---
> >  libsepol/src/module_to_cil.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/libsepol/src/module_to_cil.c b/libsepol/src/module_to_cil.c
> > index da62c8aaf0ef..1af166c9abd0 100644
> > --- a/libsepol/src/module_to_cil.c
> > +++ b/libsepol/src/module_to_cil.c
> > @@ -54,6 +54,7 @@
> >
> >  #include "kernel_to_common.h"
> >  #include "private.h"
> > +#include "module_internal.h"
> >
> >  #ifdef __GNUC__
> >  #  define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
> > --
> > 2.22.0
> >


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-26  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 19:31 [PATCH 1/1] libsepol: include module.c internal header in module_to_cil.c Nicolas Iooss
2019-06-25 16:00 ` William Roberts
2019-06-26  6:54   ` Nicolas Iooss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).