I would like to localize symbols within an unlinked object file on AIX 5.1.
However it seems that the symbols doesn't really get localized by examining 'nm' output: test.cpp: #include <stdio.h> #include <stdlib.h> void foo() { printf("foo\n"); } void bar() { printf("bar\n"); } int main() { foo(); bar(); return 0; } bash-3.00# nm test.o 0000000000000148 d .data 0000000000000148 D _GLOBAL__F__Z3foov U __gxx_personality_v0 0000000000000208 d LC..0 0000000000000210 d LC..2 0000000000000130 D main 0000000000000130 d main 00000000000000a0 T .main U .printf 00000000000000f0 t _test.rw_cpp 0000000000000000 t .text 0000000000000208 d TOC 0000000000000118 d _Z3barv 0000000000000118 D _Z3barv 0000000000000050 T ._Z3barv 0000000000000100 d _Z3foov 0000000000000100 D _Z3foov 0000000000000000 T ._Z3foov bash-3.00# objcopy -G main test.o test2.o bash-3.00# nm test2.o 0000000000000148 d .data 0000000000000148 D _GLOBAL__F__Z3foov U __gxx_personality_v0 0000000000000208 d LC..0 0000000000000210 d LC..2 0000000000000130 D main 0000000000000130 d main 00000000000000a0 T .main U .printf 00000000000000f0 t _test.rw_cpp 0000000000000000 t .text 0000000000000208 d TOC 0000000000000118 d _Z3barv 0000000000000118 D _Z3barv 0000000000000050 T ._Z3barv 0000000000000100 d _Z3foov 0000000000000100 D _Z3foov 0000000000000000 T ._Z3foov Looking at the last output foo and bar symbols are the same as before. Also when compiling with 'g++ -maix64' switch on large objects (around 1 mb) objcopy fails by generating bad code: (objcopy -G main in.o out.o was invoked prior to this command) gcc -maix64 -lpthread -o test-broken broken.o ld: 0711-590 SEVERE ERROR: Object lmxserverrtw.o cannot be processed. The length field at the beginning of the string table is invalid. collect2: ld returned 12 exit status A broken object file (which worked fine prior to being processed with objcopy) can be given upon request to [EMAIL PROTECTED] -- Summary: Objcopy fails on AIX 5.1 Product: binutils Version: 2.17 Status: NEW Severity: enhancement Priority: P2 Component: binutils AssignedTo: unassigned at sources dot redhat dot com ReportedBy: henrik_goldman at mail dot tele dot dk CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=2842 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils