Sponsored Content
Top Forums Programming How to make use others' C library installed not for the system-wide (Ubuntu/Linux)? Post 303043071 by GRMartin on Friday 17th of January 2020 09:50:13 AM
Old 01-17-2020
rpath is actually a linker option rather then a compiler option. gcc passes it to ld.



Well, th estandard way to use shared objects (.so) is to install them in the system directories used for that purpose (/usr/lib etc.) but that's not always possible. The archive (.a) allows you to link objects into your executable which produces a larger exectable but gets around the problem. If the library is updated you must recompile whereas with a shared object you only need to recompile if the update breaks your code.


For the loader to load a shared object at runtime it must know where to find them. rpath tells the linker to embed the path in the header of the executable but if the so is moved the loader won't be able to load it. ORIGIN resolves to whereeve the binary is at runtime so as long as the library stays with the executable it works.


-Greg.
This User Gave Thanks to GRMartin For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

links working system wide

I have created symbolic links to several frequently used commands, for example: "lt" is a link to "ls -ltrgo|tail". What can I do to make these links available system-wide, or at least in the directories my coworkers are in most of the time? I have copied the link to several directories, and... (6 Replies)
Discussion started by: jpprial
6 Replies

2. UNIX for Advanced & Expert Users

System wide CDE setup

Does anyone know how to make system wide changes to the CDE's front panel icons? I dont know if it matters but im running Solaris 9. THanks (1 Reply)
Discussion started by: meyersp
1 Replies

3. UNIX for Dummies Questions & Answers

FIND function - system wide

Hi, I have a task to search for a file called 'Xstartup' in the whole system because there might be different versions of it which overrite eachother. Can anyone suggest a smart command to run this search ? The machine needs to scan every single folder beginning from root. Please help, I am... (5 Replies)
Discussion started by: DGoubine
5 Replies

4. Filesystems, Disks and Memory

How to mount/make a FAT system on Linux

Yea i was wondering how i would mount, and create a FAT directory that way i can save files in the FAT directory in a windows system and be able to access them on Linux systems. Or if there is any other way to share files between Linux and Windows. Any responds will help... thanks! (2 Replies)
Discussion started by: kyoist
2 Replies

5. Shell Programming and Scripting

system wide password change

Hello, I am new to shell scripting and I was trying to write a script that would force a system wide password change except for admins. I am having some trouble and any help that someone could give me would be greatly appreciated. I am trying to do it by using the UID as the marker for anyone... (6 Replies)
Discussion started by: kilemark
6 Replies

6. Linux

System wide find and sort

Hi, I need to look for a config file (ldap.conf) and pick the latest modified file. `locate` tells me there are many ldap.conf's, some in /etc, /usr, /home, etc. Is there some way I can sort them by last modified time via bash? I was thinking maybe I could pipe the output of `locate` to `ls... (4 Replies)
Discussion started by: Housni
4 Replies

7. Linux

How to run User-mode Linux installed with synaptic package manager in Ubuntu 10.10

I have installed user-mode linux kernel in Ubuntu 10.10 with the help of Synaptic package manager. But I'm not getting how to run it. If we install it manually, we've to run it using the executable binary file. But here, I'm unable to locate any such file. Please help.... Thanking You.... ... (0 Replies)
Discussion started by: rohitadeshmukh1
0 Replies

8. Red Hat

Changing system-wide for umask

Hi everybody, How can I change the default UMASK for non root users, e.g. I want the umask for every new created user will be 0044. Thanks (6 Replies)
Discussion started by: leo_ultra_leo
6 Replies

9. Shell Programming and Scripting

System-wide search

When looking for wherever a program or a filename appears in the system, a short scrip is "findinner" which another script calls with a long parameter list consisting of path names ending with ".sh" or ".menu". "findinner" looks like this: # If not .savenn file, show name and result of grep. #... (4 Replies)
Discussion started by: wbport
4 Replies
elfdump(1)						      General Commands Manual							elfdump(1)

NAME
elfdump - dump information contained in object files. SYNOPSIS
num] num2] name] section] num] num2] files... DESCRIPTION
takes one or more object files or libraries and dumps information about them. The following options are supported: Dumps archive headers from an archive library. Dumps the string table(s). (Modifier) Demangles C++ symbol names before printing them. This modifier is valid with and If specified with this modifier is ignored. If specified with name, the symbol whose unmangled name matches name will be printed, and its symbol name will be printed as a demangled name. Prints the .note section which contains the compilation unit dictionary and linker footprint. This option has the same effect as Prints the compilation unit dictionary of the .notes section. Prints the linker footprint of the .notes section. The linker footprint has information on the linker used to generate the file as well as the link time. (Modifier) Prints the section whose index is num. (Modifier) Prints the sections in the range 1 to num2. If used with the sections in the range num to num2 are printed. Valid with If used with only the relocations which apply to the section(s) in the range are printed. Dumps the file header (ELF header). Dumps global symbols from an archive. Dumps the section headers. (Modifier) Dumps output information in hexadecimal, octal, or decimal format, with all options. Displays the run-time interpreter path name for (usually the location of the dynamic loader and microloader). Only shared bound executables have this string. To change the setting, use the command. Prints the object dictionary for one or more executable files, if the source file was compiled with the option or linked with (PA-RISC only) option. The object dictionary entry contains the name of the object file that contributed to a particular section, the relative offset within the section, size of the object file's contribution, and attributes of the entry. Prints the CTTI section headers according to the directory member relationship. Dumps the section in shared libraries and dynamically linked program files. Prints the section, which is only created when the incremental linker is used (with the command), or when the linker option is used (which is the default), along with the compiler option, (which is NOT the default). Prints the section, which is only created when the incremental linker is used (with the command), or when the linker option is used (which is the default), along with the compiler option, (which is NOT the default). Prints the section, which is only created when the incremental linker is used (with the command), or when the linker option is used (which is the default), along with the compiler option, (which is NOT the default). (Modifier) Dumps information about the specified section or symbol name. This option is valid with and If used with name pertains to a symbol name and will only dump the symbol entry whose name matches name. If used with the other options, name pertains to a section name and will only dump the section whose name matches it. Dumps the optional headers (program headers). (Modifier) Do not print titles, with all options. (Modifier) Suppresses printing CTTI section headers. Valid with option. Dumps the relocations. Dumps the section contents. Dumps any section beginning with as a string table. (Modifier) Dumps the section specified by name. Valid with and only. (Modifier) Dumps output information in short format. Valid with the and options. Dumps the symbol table entries. (Itanium-based systems) Dumps the value of in symbol table, in addition to information dump from option. This option is useful to verify the data stored in the symbol table. Prints the symbol whose index is num. (Modifier) Prints the symbols in the range 0 to num2. If used with print the symbols in the range num to num2. Valid with Prints versioned symbols. Prints the usage menu. Prints the unwind table. (Modifier) Verifies the CTTI section headers before printing. Valid with the option. Prints the version number for EXAMPLES
To see the functions exported from a shared library: To see the global data items exported from a shared library: To display string table information To list the shared libraries linked with a program or shared library (dependent libraries): To list the embedded path for shared libraries opened by a program: SEE ALSO
System Tools ld(1) Invoke the link editor Miscellaneous a.out(4) Assembler, compiler, and linker output elf(3E) Executable and Linking Format Texts and Tutorials (See the option) (See manuals(5) for ordering information)
All times are GMT -4. The time now is 08:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy