unable to dynamically link in AIX 4.3

unable to dynamically link in AIX 4.3

Post by Scott Jeid » Fri, 09 Oct 1998 04:00:00



I'm using the gcc 2.8.1 compiler (from www.bull.de) and when I try to
build something I get the good old error that libc.a isn't an import
library.  I can link statically by building with 'gcc -static foo.c -o
foo' and it works just fine.  

Is there a different gcc option I need to specify to be able to
dynamically link in libc?  I suppose I could just statically link
everything, but I'd rather not if there's a quick way around this.  It's
also a pain becuase all of the gnu configure scripts fail right away
since the compiler won't build with the default settings and I'd rather
not have to add the static switch to all of them.

Thanks in advance,
Scott

 
 
 

unable to dynamically link in AIX 4.3

Post by Valdis Kletniek » Fri, 09 Oct 1998 04:00:00



> I'm using the gcc 2.8.1 compiler (from www.bull.de) and when I try to
> build something I get the good old error that libc.a isn't an import
> library.  I can link statically by building with 'gcc -static foo.c -o
> foo' and it works just fine.  

I beleive there is a patch/hack/etc needed for GCC to understand
the fact that under AIX 4.3, there are 32 and 64 bit binaries.

  application_pgp-signature_part
< 1K Download

 
 
 

unable to dynamically link in AIX 4.3

Post by David Edelso » Mon, 12 Oct 1998 04:00:00


Quote:>>>>> Scott Jeide writes:

Scott> I'm using the gcc 2.8.1 compiler (from www.bull.de) and when I try to
Scott> build something I get the good old error that libc.a isn't an import
Scott> library.  I can link statically by building with 'gcc -static foo.c -o
Scott> foo' and it works just fine.  

Scott> Is there a different gcc option I need to specify to be able to
Scott> dynamically link in libc?  I suppose I could just statically link
Scott> everything, but I'd rather not if there's a quick way around this.  It's
Scott> also a pain becuase all of the gnu configure scripts fail right away
Scott> since the compiler won't build with the default settings and I'd rather
Scott> not have to add the static switch to all of them.

        Use EGCS, also available from the Bull site.

David

 
 
 

1. Incremental linking (AIX 4.3)

To start with, is incremental linking possible on AIX 4.3? Specifically,
can you take an executable program and add extra libraries to it?
Here is what I'm trying to do:

I'm trying to take a existing binary program and add extra functions to it.
I'll access these functions while the program is running by using ptrace
to write jump instructions to the new functions. Unfortunately, a branch
on POWER has a limited range. The solution I've come up with is to
add extra libraries to the program, each of which contain blank space I can
use. What I envision is something like this:

<program>
Statically link a library which contains 1K of space (goes in segment 1)
Dynamically link a library which contains 1K of space (goes in segment D)
Run the program
Cause the program to dlopen() my function library, which goes in segment 2.

The difficulty is linking in the static and dynamic libraries, after the
executable has been built. Is this possible? If so, how?

Thanks,
Drew

--
Drew Bernat
Paradyn Project                                                  __ ____


2. Cat 5 Cable Diagrams

3. Anyone got a static-linked ls for aix 4.3?

4. linuxconf startup hang

5. Compile link error on AIX 4.3

6. "Parametr list is to long"

7. link apache 1.2.6 modules on AIX 4.3.x

8. Kernal build and mail problems

9. Installing D-link Ethernet Print Server (de-690) on AIX 4.3

10. Is AIX 4.3.x binary compatible to 4.3.x

11. AIX 4.2 vs AIX 4.3

12. Running AIX 4.3 application on AIX 5.0

13. Need help with executables compiled on AIX 4.3 but being run on AIX 3.2