shared-libraries

Change current process environment's LD_LIBRARY_PATH

为君一笑 提交于 2019-11-27 07:50:39
Is it possible to change environment variables of current process? More specifically in a python script I want to change LD_LIBRARY_PATH so that on import of a module 'x' which depends on some xyz.so , xyz.so is taken from my given path in LD_LIBRARY_PATH is there any other way to dynamically change path from where library is loaded? Edit : I think I need to mention that I have already tried thing like os.environ["LD_LIBRARY_PATH"] = mypath os.putenv('LD_LIBRARY_PATH', mypath) but these modify the env. for spawned sub-process, not the current process, and module loading doesn't consider the

Debugging shared libraries with gdbserver

懵懂的女人 提交于 2019-11-27 07:44:38
问题 I am using gdbserver on target and CodeSourcery IDE. My hardware is a gumstix with a omap3530. I can step through code in my main application but if I attempt to step into a function in a shared library I get memory address and a debugger terminates. This is my library that is compiled and copied to the /lib folder on the target system.(it does have debug symbols) I have attempted to use the .gbdinit file to set solib-absolute-prefix /lib Here are the warnings from the gdb trace: 903,056 13

TFS 2010 Branch Across Team Projects - Best Practices

帅比萌擦擦* 提交于 2019-11-27 07:16:55
I'm having issues understanding how to configure TFS according to best practices as provided by the TFS Ranger team. The issue is such: My company has several products which make use of a shared common code base. > $/Core > -> /Main/Source (Parent Branch) > > $/Product1 > -> /Main/Source > -> /Main/Source/Core/Source (Child Branch from $/Core) > -> /Main/Source/... > > $/Product2 > -> /Main/Source > -> /Main/Source/Core/Source (Child Branch from $/Core) > -> /Main/Source/... Therefore we have one team collection and say, three team projects for this example. ($/* is a team project) Our initial

Pack shared libraries into the elf

别说谁变了你拦得住时间么 提交于 2019-11-27 07:01:17
Is there a utility that can take ALL the SO's that an Elf needs turn them into static then converts the Elf to be SO's free? Here are some projects you might find useful: Statifier (basically does what you want) ERESI (might do what you want, also allows for analysis of ELF targets) NOTE: I've not used either application myself. Statifier is an option. Another option is Ermine . While Ermine is commercial it behaves better than statifier on systems with memory randomization. I've used Statifier as mentioned by codelogic. It worked well for several Linux commands like ethtool. Probably not,

ELF Shared Object in x86-64 Assembly language

人盡茶涼 提交于 2019-11-27 06:53:53
问题 I'm trying to create a Shared library (*.so) in ASM and I'm not sure that i do it correct... My code is: .section .data .globl var1 var1: .quad 0x012345 .section .text .globl func1 func1: xor %rax, %rax # mov var1, %rcx # this is commented ret To compile it i run gcc ker.s -g -fPIC -m64 -o ker.o gcc ker.o -shared -fPIC -m64 -o libker.so I can access variable var1 and call func1 with dlopen() and dlsym() from a program in C. The problem is in variable var1. When i try to access it from func1,

Trouble installing pygame using pip install

纵饮孤独 提交于 2019-11-27 06:53:23
问题 I tried: c:/python34/scripts/pip install http://bitbucket.org/pygame/pygame and got this error: Cannot unpack file C:\Users\Marius\AppData\Local\Temp\pip-b60d5tho-unpack\pygame (downloaded from C:\Users\Marius\AppData\Local\Temp\pip-rqmpq4tz-build, conte nt-type: text/html; charset=utf-8); cannot detect archive format Cannot determine archive format of C:\Users\Marius\AppData\Local\Temp\pip-rqmp q4tz-build Please if anyone have any solutions please feel free to share them! I also tried pip

How to create static linked shared libraries

自闭症网瘾萝莉.ら 提交于 2019-11-27 06:48:26
问题 For my master's thesis i'm trying to adapt a shared library approach for an ARM Cortex-M3 embedded system. As our targeted board has no MMU I think that it would make no sense to use "normal" dynamic shared libraries. Because .text is executed directly from flash and .data is copied to RAM at boot time I can't address .data relative to the code thus GOT too. GOT would have to be accessed through an absolute address which has to be defined at link time. So why not assigning fixed absolute

Passing pointer argument in MATLAB to a C-DLL function foo(char**)

孤人 提交于 2019-11-27 06:22:13
问题 I am writing a C-DLL to be called from MATLAB. Is it possible to call a function with const char ** parameter? e.g. void myGetVersion( const char ** ); The C code would be: const char *version=0; myGetVersion( &version ); What would be corresponding MATLAB-Code (if it is possible at all)? Thank you very much! P.S.: I think this is the help page, but I couldn't find my case :-( 回答1: The answer is to build a pointer to a c-string using the LIBPOINTER function as @JonasHeidelberg suggested. Let

What exactly does `-rdynamic` do and when exactly is it needed?

倖福魔咒の 提交于 2019-11-27 05:21:36
问题 What exactly does -rdynamic (or --export-dynamic at the linker level) do and how does it relate to symbol visibility as defined by the -fvisibility* flags or visibility pragma s and __attribute__ s? For --export-dynamic , ld(1) mentions: ... If you use "dlopen" to load a dynamic object which needs to refer back to the symbols defined by the program, rather than some other dynamic object, then you will probably need to use this option when linking the program itself. ... I'm not sure I

CMake: how to produce binaries “as static as possible”

ⅰ亾dé卋堺 提交于 2019-11-27 05:13:42
问题 I would like to have control over the type of the libraries that get found/linked with my binaries in CMake. The final goal is, to generate binaries "as static as possible" that is to link statically against every library that does have a static version available. This is important as would enable portability of binaries across different systems during testing. ATM this seems to be quite difficult to achieve as the FindXXX.cmake packages, or more precisely the find_library command always