On 04/19/2018 01:02 AM, Pham, Phong wrote:
> “This is likely happening because the default auto-init glue module for
> a final executable is mentioned in the flags, you either want to pass
> --auto-init-solib if you do need auto-init for bootstrapping a DSO, or
> --no-auto-init if you don't care about auto-bootstrap, along with
> --ldflags to xeno-config.
> 
>  
> 
> http://www.xenomai.org/documentation/xenomai-3/html/man1/xeno-config/index.html“
> 
>  
> 
>  
> 
> I see.  After adding either --auto-init-solib or --no-auto-init when
> compiling for library, along with compiler option -fPIC, mmap() still
> returns -1; (W/out -fPIC, munmap() cannot be relocated (similar types of
> error like before).

xeno-config --ldflags will return the Xenomai-related flags for linking,
which -fPIC is not. If you plan for building a DSO, you need to apply
the common rules stated in the ld documentation, which include
mentioning  -fPIC / -fpic for shared libs. This is not a Xenomai issue.

  However, errno is 0.  How come errno returns “no
> error” when mmap() returns failure?
> 

Please post a test code snippet illustrating the problem.

-- 
Philippe.

_______________________________________________
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai

Reply via email to