Today I used a brute force method converting all libraries to 32 bit format. If I compile with a library directory flag, e.g. g++ -g plus.cc -o plus -L/home/e1/lib/ I get no error messages anymore. I hear IBM is not prepared to supply 32 bit-only libraries but a previous release binary is supposed to work without any problem for AIX 4.3.2. If a Perl wizard can improve/beautify the Perl script, please let me know. Martin Tim Mooney schreef: > In article <8e4j6b$ga4$[EMAIL PROTECTED]>, Elizabeth Harriman <[EMAIL PROTECTED]> wrote: > > Hi, > > > > We get the following error when compiling a simple c program with gcc > > 2.95.2, then running gdb on it: > > > > % gcc test.c > > % gdb a.out > > GNU gdb 4.18 > > Copyright 1998 Free Software Foundation, Inc. > > GDB is free software, covered by the GNU General Public License, and you are > > welcome to change it and/or distribute copies of it under certain conditions. > > Type "show copying" to see the conditions. > > There is absolutely no warranty for GDB. Type "show warranty" for details. > > This GDB was configured as "rs6000-ibm-aix4.3.2.0"... > > (gdb) b main > > Breakpoint 1 at 0x10000354 > > (gdb) run > > Starting program: /u8/bustaff/ejh/a.out > > "/usr/lib/libcrypt.a": not in executable format: File format not recognized. > > > > Has anyone else had these problems, or does anyone have any suggestions? > > Elizabeth- > > Yes, I've seen similar problems on AIX 4.3.x. My guess is that gdb doesn't > understand "big format" libraries (run > > file /usr/lib/libcrypt.a > > to see what I mean), though that is just a guess. I've encountered other > difficulties with gdb on AIX in the past (even prior to versions with big > format libraries). > > The gdb team would probably welcome patches contributed from an > AIX-knowledgeable person (any IBM engineers listening?!) that enhances > gdb's support for AIX. HP did it to improve gdb's support of HP-UX, so > maybe IBM will follow suit. I wouldn't hold my breath, though. > > Tim > -- > Tim Mooney [EMAIL PROTECTED] > Information Technology Services (701) 231-1076 (Voice) > Room 242-J1, IACC Building (701) 231-8541 (Fax) > North Dakota State University, Fargo, ND 58105-5164
#!/usr/bin/perl # script written by martin warf. use it at your own risk. system"ls -la /usr/lib/>dirlist"; open(DIRLIST, "dirlist")|| die "cannot open directory list\n"; while($libname=<DIRLIST>) { chop($libname); #remove end-of-line character # get 9th word. (\S+: one or more non-space characters.) $libname=~s/(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+ (\S+)(.*)/$9/; # find archieve files '*.a' that are no symbolic links #if($libname=~/\.a/ && !($libname=~/->/)) if($libname=~/\.a/) { $libname=~s/\.a//; #strip extension '.a' # print $libname, "\n"; &createNewLib($libname); } } close(DIRLIST); system"rm dirlist"; sub createNewLib { #input: library name without extension 'a' #output: new library in current directory with extension '32a' containing only 32 bit functions # retrieve all functions in library $oldLib=$_[0].".a"; #add extension to library name. #$newLib=$_[0].".32a"; $newLib=$_[0].".a"; #print"oldlib=", $oldLib, " newLib=", $newLib, "\n"; system"ar -v -t /usr/lib/$oldLib >multi_column"; #retrieve 8th column, containing the library function names open(MULTILIST, "multi_column")|| die "cannot open multi column list\n"; open(NAMELIST, ">namelist") || die "cannot build library functions name list\n"; while($name=<MULTILIST>) { chop($name); #remove end-of-line character # (\S+: one or more non-space characters. get 8th word.) $name=~s/(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/$8/; system"ar -v -x /usr/lib/$oldLib $name>/dev/null/"; #extract library function from old lib system"ar -v -q $newLib $name>/dev/null"; #add library function to new lib system"rm $name"; print NAMELIST $name,"\n"; } close(MULTILIST); close(NAMELIST); system"rm multi_column namelist"; #print"ar -g $newLib\n"; system"ar -g $newLib"; }