This question is a follow on to:
http://www.experts-exchange.com/Operating_Systems/AIX_IBMs_UNIX_OS/Q_21703889.htmlUsing the same build script, I tried to modify it to created a 64 bit shared library that has libgcc.a statically linked to it.
Firstly, its my understanding that in AIX you cannot have a mixed library with 32 bit and 64 bit functions.
When I do a:
nm -Xd64 on the libgcc.a that is included, I get output, so I am making an assumption that I am including a 64 bit libgcc.a.
Here is my doit script (changed the name from buildit to doit, as it is quicker to tyoe, and sjm_ee uses that name, so how can I go wrong ? :-) )
OBJECT_MODE=64
export OBJECT_MODE
cc -maix64 -c share1.c
cc -maix64 -c share2.c
ld -lc -o shrsub.o share1.o share2.o -bE:shrsub.exp -bM:SRE -bnoentry -bnoquiet
cc -maix64 -o main main.c shrsub.o -L.
./main
and the output:
(ld): setopt 64
(ld): halt 4
(ld): lrgpage 0
(ld): savename shrsub.o
(ld): filelist 3 2
(ld): setopt noprogram
(ld): noentry
NOENTRY: There is no entry point.
(ld): lib /usr/lib/libc.a
(ld): i share1.o
(ld): i share2.o
INSERT: Shared object libc.a[shr_64.o]: 2270 symbols imported.
INSERT: Shared object libc.a[aio_64.o]: 11 symbols imported.
INSERT: Shared object libc.a[pse_64.o]: 5 symbols imported.
INSERT: Shared object libc.a[dl_64.o]: 4 symbols imported.
INSERT: Shared object libc.a[pty_64.o]: 1 symbols imported.
FILELIST: Number of previously inserted files processed: 3
(ld): exports shrsub.exp
EXPORTS: Symbols exported: 10
(ld): resolve
ld: 0711-324 WARNING: Export of .func1 changed to export of func1
ld: 0711-324 WARNING: Export of .func2 changed to export of func2
ld: 0711-324 WARNING: Export of .func3 changed to export of func3
RESOLVE: 13 of 2669 symbols were kept.
RESOLVE: The return code is 4.
(ld): addgl /usr/lib/glink64.o
ADDGL: Glink code added for 1 symbols.
(ld): er full
ld: 0711-319 WARNING: Exported symbol not defined: _GLOBAL__F__Unwind_GetLang
uageSpecif
icData
ld: 0711-319 WARNING: Exported symbol not defined: _GLOBAL__F___register_fram
e_info_bas
es
ld: 0711-319 WARNING: Exported symbol not defined: .__register_frame_info_tab
le
ld: 0711-319 WARNING: Exported symbol not defined: .__deregister_frame_info
ER: The return code is 4.
(ld): mismatch
MISMATCH: No type mismatches exist.
(ld): comprld
COMPRLD: Kept 17 of 17 relocation entries.
(ld): origin 0x0 0x0
(ld): save SRE .
SAVE: Section sizes = 319+104+0 (0x13F+0x68+0x0 hex)
SAVE: Size of TOC: 32 (0x20 hex)
(ld): rc
RC: Highest return code was 4.
ld: 0711-317 ERROR: Undefined symbol: _GLOBAL__F__Unwind_GetLang
uageSpecif
icData
ld: 0711-317 ERROR: Undefined symbol: _GLOBAL__F___register_fram
e_info_bas
es
ld: 0711-317 ERROR: Undefined symbol: .__register_frame_info_tab
le
ld: 0711-317 ERROR: Undefined symbol: .__deregister_frame_info
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
./doit: ./main: A file or directory in the path name does not exist.
--------------------------
----
Now even when I tried adding these symbols to my .exp, I still get the same result.
How do I get it to work?
AIX 5.1 64 Bit
GCC 3.0.1
Marty
Start Free Trial