This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-rdynamic and -static


[Please Cc me as I am not subscribed.]

Our software has modules that are implemented as shared libraries. But
now there's a situation where we need it to be statically linked, and we
can't figure out how to get it to work.

The software is called BRLTTY; it drives braille displays. There is a
central module that implements screen review functions, and there are
several driver modules, one for each supported braille display model. The
driver modules are implemented as shared libraries, so we can choose at
run-ttime which one to use.

Now we want to make an accessible boot diskettes / distribution
installation diskettes. We link our main BRLTTY module statically,
because we don't have a sufficiently small libc and friends.

Our problem is that our driver libraries reference symbols from the main
program, and from libc. Yet these symbols are no longer listed in the ELF
headers of the executable when it is linked with -static and therefore we
get "undefined symbol" errors when we dlopen our driver libraries.

I'm no ELF expert and I'm not really familiar with linker scripts. I've
read what I could of the manuals, and asked several fairly knowledgeable
friends, but I couldn't figure out how to do it. Can anyone help?

Can we:
-Somehow build a specialized shared lib with just the part of libc that
we need?
-Or have the ELF headers of our executable list all the symbols it
-Or somehow explicitly export the symbols we need in our shared libs?

Thanks for any hints.

[Please Cc me as I am not subscribed.]

Stéphane Doyon

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]