Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Mar 2006
Shared variables (between ELF files)
I want a variable to be shared between several ELF executables in the same process image - e.g. different .so files and the program executable.
And I don't want the value of the variable to be just copied between the executables (this is currently what happens for me) - i want all references to the variable in all executables to be dynamically linked against the same memory-location in the same .so file.
What is the soulution? Some command-line argument to ls? Some change in the linker script? Something with the __attribute__ stuff? I'm using Red Hat 9.
Please HELP (thank you)!