shared-libraries

How are symbols contained in the libpythonX.X linked to numpy extension dynamic libraries?

只愿长相守 提交于 2019-12-23 08:00:35
问题 I'm currently having a problem where I'm able to use and import numpy in an interpreter environment, but I'm unable to import or use numpy from python embedded in C/C++ . So I'm curious to how numpy extension libraries, specifically numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so is linked to the standard python package symbols ( PyExc_UserWarning symbol specifically). My current error output says that PyExc_UserWarning is undefined . This symbol exists in libpythonX.Y.m.so as I

Linux shared library depends on symbols in another shared library opened by dlopen with RTLD_LOCAL

做~自己de王妃 提交于 2019-12-23 05:13:32
问题 I have a shared library libmain.so , loaded by the host program with dlopen("libmain.so", RTLD_LOCAL) , and under some conditions, libmain.so will load another shared library, libpatch.so , also with dlopen . The problem is, libpatch.so depends on symbols inside libmain.so , so how can I solve this? Change RTLD_LOCAL to RTLD_GLOBAL is not an option due to permission reasons. There is a question quite similar to this one, the solution to that problem is to make libpatch.so a dependency of

Stripping C++ library of not required code for an application [closed]

南楼画角 提交于 2019-12-23 04:47:29
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I have an application dependent on many libraries. I am building everything from sources on an ubuntu machine. I want to remove any function/class that is not required by an application. Is there any tool to help with that? P.S. I want to remove source code from the library not just symbols from object files. 回答1:

Android Resolving style properties and attributes?

荒凉一梦 提交于 2019-12-23 03:47:12
问题 My Android Application has a main Project Module that has the following declaration in the styles file. This Theme is used in the Manifest file on the "application" tag so all components within the "application" element have the same theme applied. <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.NoActionBar"> <item name="android:colorPrimary" tools:ignore="NewApi"> @color/light_black </item> <item name="colorPrimary">@color/light_black</item> <item name=

How to compile Linux C program to run on another Linux machine?

左心房为你撑大大i 提交于 2019-12-23 03:15:35
问题 I am using a VPS to host my website, but the gcc package is not installed. The libc.so.6 is mapped to libc-2.12.so and this is my problem, because on my home computer the library is mapped to libc-2.15.so From time to time, I need to run some programs on VPS, so when I compile the C sources I use the -static option to include in the executable file everything is needed. The program works fine, but it bothers me that executable is about 800 Kb. If I compile without using -static option,

How to compile Linux C program to run on another Linux machine?

最后都变了- 提交于 2019-12-23 03:15:10
问题 I am using a VPS to host my website, but the gcc package is not installed. The libc.so.6 is mapped to libc-2.12.so and this is my problem, because on my home computer the library is mapped to libc-2.15.so From time to time, I need to run some programs on VPS, so when I compile the C sources I use the -static option to include in the executable file everything is needed. The program works fine, but it bothers me that executable is about 800 Kb. If I compile without using -static option,

Is this an appropriate way to start sharing code across mutliple mvc apps?

人走茶凉 提交于 2019-12-23 02:45:39
问题 We are developing multiple applications for the same company. The applications are distinct (so not suitable for a multi-tennant app) but there will be lots of shared models, a couple of shared controllers and ideally some shared views. It is the first time I have had to do this, and wonder if I am approaching it correctly. Here is my plan: Create a DB for the shared stuff, and another (per application) for application specific stuff Each application will have 2 connections in web config

shared libraries (dlopen) and thread-safety of library static pointers

帅比萌擦擦* 提交于 2019-12-23 01:54:59
问题 When I load a shared library dynamically, for example with dlopen on linux, do I have to worry about the visibility of the loaded library between processors, or will it be automatically fenced/ensured safe? For example, say I have this function in the loaded library: char const * get_string() { return "literal"; } In the main program using such a string-literal pointer is safe between multiple threads as they are all guaranteed to see its initial value. However, I'm wondering how the rules of

How are variables in shared libraries referenced by loader?

一曲冷凌霜 提交于 2019-12-22 18:52:10
问题 I now understand how dynamic functions are referenced, by procedure linkage table like below: Dump of assembler code for function foo@plt: 0x0000000000400528 <foo@plt+0>: jmpq *0x2004d2(%rip) # 0x600a00 <_GLOBAL_OFFSET_TABLE_+40> 0x000000000040052e <foo@plt+6>: pushq $0x2 0x0000000000400533 <foo@plt+11>: jmpq 0x4004f8 (gdb) disas 0x4004f8 No function contains specified address. But I don't know how dynamic variables are referenced,though I found the values are populated in the GOT once

How are variables in shared libraries referenced by loader?

折月煮酒 提交于 2019-12-22 18:52:10
问题 I now understand how dynamic functions are referenced, by procedure linkage table like below: Dump of assembler code for function foo@plt: 0x0000000000400528 <foo@plt+0>: jmpq *0x2004d2(%rip) # 0x600a00 <_GLOBAL_OFFSET_TABLE_+40> 0x000000000040052e <foo@plt+6>: pushq $0x2 0x0000000000400533 <foo@plt+11>: jmpq 0x4004f8 (gdb) disas 0x4004f8 No function contains specified address. But I don't know how dynamic variables are referenced,though I found the values are populated in the GOT once