10 More Discussions You Might Find Interesting
1. Programming
This is the first time that I created a dynamic library in linux and although the program works, I do not get the correct information about the library when executing ldd.
I explain the details:
1) Source code:
bye_fn.c:
#include <stdio.h>
#include "hello.h"
void bye (const char*... (9 Replies)
Discussion started by: jose_spain
9 Replies
2. AIX
Hi,
I have a problem about loaded shared libraries. I'm issuing ‘procldd' for a process and AIX shows me the loaded shared libraries. I'm collecting these libraries and counting their size. They were 350MB. After this, I'm issuing ‘ps vx' and I'm seeing that the process takes 130MB from AIX's... (1 Reply)
Discussion started by: jhatzics
1 Replies
3. AIX
Hello guys, I have a trouble when running an application in AIX, I've compiled and the
LIBRARY_PATH seems ok, but I get the following message:
rtld: 0712-001 Symbol __pthread was referenced
from module main_app(), but a runtime definition
of the symbol was not found
ldd... (4 Replies)
Discussion started by: edgarvm
4 Replies
4. UNIX for Advanced & Expert Users
Hi,
I am trying to create a shared library from a .c file using
gcc -c -fpic -I/usr/local/include Chksum.C -o Chksum.o
gcc -shared -o libtclcksum.so Chksum.o
when i try to load this shared library libtclcksum.so in tclsh
% load libtclcksum.so
I get the following error:
couldn't load... (1 Reply)
Discussion started by: archana485
1 Replies
5. UNIX for Advanced & Expert Users
can someone explain whether my understanding is correct
lets suppose we have a program that uses library x.
if x is static then the code of x will be part of our program, so if we're going to have 5 executables of our program, then each executable will have x as part of it.
Also, x does not... (2 Replies)
Discussion started by: JamesByars
2 Replies
6. AIX
Hi All,
I'm facing the following issue with my shared libraries in AIX.
memory related calls such as memset, memcpy, malloc etc are failing miserably.
there is something wrong with stack/memory which i can't guess.
i've used the following flags to build my libraray:
ld -G... (0 Replies)
Discussion started by: abhinav05252
0 Replies
7. Linux
How do i make a library shared
say i have a library a.so which i have just compiled.
I want to make it shared how do i make it
Next Queation is what is the difference between a.so.0 a.so.1 a.so.2 & a.so :rolleyes: (1 Reply)
Discussion started by: wojtyla
1 Replies
8. UNIX for Dummies Questions & Answers
I have a doubt about the shared libraries. Where do you set the path for the shared libaries, for the dynamic loader to locate. Any suggestion would be of great help. thanks (3 Replies)
Discussion started by: ramkumar_gr
3 Replies
9. Programming
I am compiling code which produces .a and .la libraries. How can I produce .so libraries? I know that gcc -shared does but how? (2 Replies)
Discussion started by: thalex
2 Replies
10. Programming
Hello everybody,
I am having major problems at the moment with shared libraries and I have to little knowledge of them to solve them. So please, please help me :)
Ok this is the problem:
I have a library A, which uses B and C, and C uses again D.
If I try to run A as plugin in apache,... (0 Replies)
Discussion started by: Micky
0 Replies
execstack(8) System Manager's Manual execstack(8)
NAME
execstack - tool to set, clear, or query executable stack flag of ELF binaries and shared libraries
SYNOPSIS
execstack [OPTION...] [FILES]
DESCRIPTION
execstack is a program which sets, clears, or queries executable stack flag of ELF binaries and shared libraries. Linux has in the past
allowed execution of instructions on the stack and there are lots of binaries and shared libraries assuming this behaviour. Furthermore,
GCC trampoline code for e.g. nested functions requires executable stack on many architectures. To avoid breaking binaries and shared
libraries which need executable stack, ELF binaries and shared libraries now can be marked as requiring executable stack or not requiring
it. This marking is done through the p_flags field in the PT_GNU_STACK program header entry. If the marking is missing, kernel or dynamic
linker need to assume it might need executable stack. The marking is done automatically by recent GCC versions (objects using trampolines
on the stack are marked as requiring executable stack, all other newly built objects are marked as not requiring it) and linker collects
these markings into marking of the whole binary or shared library. The user can override this at assembly time (through --execstack or
--noexecstack assembler options), at link time (through -z execstack or -z noexecstack linker options) and using the execstack tool also on
an already linker binary or shared library. This tool is especially useful for third party shared libraries where it is known that they
don't need executable stack or testing proves it.
OPTIONS
-s --set-execstack
Mark binary or shared library as requiring executable stack.
-c --clear-execstack
Mark binary or shared library as not requiring executable stack.
-q --query
Query executable stack marking of binaries and shared libraries. For each file it prints either - when executable stack is not
required, X when executable stack is required or ? when it is unknown whether the object requires or doesn't require executable
stack (the marking is missing).
-V Print execstack version and exit.
-? --help
Print help message.
--usage
Print a short usage message.
ARGUMENTS
Command line arguments should be names of ELF binaries and shared libraries which should be modified or queried.
EXAMPLES
# execstack -s ~/lib/libfoo.so.1
will mark ~/lib/libfoo.so.1 as requiring executable stack.
# execstack -c ~/bin/bar
will mark ~/bin/bar as not requiring executable stack.
# execstack -q ~/lib/libfoo.so.1 ~/bin/bar
will query executable stack marking of the given files.
SEE ALSO
ld.so(8).
BUGS
execstack doesn't support yet marking of executables if they do not have PT_GNU_STACK program header entry nor they have room for program
segment header table growth.
AUTHORS
Jakub Jelinek <jakub@redhat.com>.
28 October 2003 execstack(8)