This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
objcopy - Invalid operation
- From: James <james00_c at yahoo dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 22 Oct 2003 16:20:57 -0700 (PDT)
- Subject: objcopy - Invalid operation
Greetings-
I am trying to rename a symbol in an object file
called "error_msg.o" and following is its information:
% objdump -t error_msg.o
error_msg.o: file format mach-o-be
SYMBOL TABLE:
00000000000006a4 LC_SEGMENT.__TEXT.__cstring
_rcsid
00000000000003f8 LC_SEGMENT.__DATA.__data
_copyright
000000000000036c LC_SEGMENT.__TEXT.__text
__et_list
0000000000000370 LC_SEGMENT.__TEXT.__text
_vmsgs
0000000000000000 *UND* _negative_message
000000000000074c LC_SEGMENT.__DATA.__const
_buffer
00000000000000bc *UND* _volume_message
0000000000000314 g *UND* _add_to_error_table
00000000000000fc g *UND* _error_message
0000000000000000 g *UND* _error_table_name
0000000000000000 g *UND* _sprintf
0000000000000000 g *UND* _strcat
0000000000000000 g *UND* _strerror
0000000000000000 g *UND*
dyld_stub_binding_helper
The error messages that I receive are as follows:
% objcopy --redefine-sym
_error_message=_au_error_message error_msg.o
objcopy: error_msg.o: Invalid operation
% objcopy -F mach-o-be --redefine-sym
_error_message=_au_error_message error_msg.o
error_msg2.o
objcopy: error_msg.o: Invalid operation
% objcopy -I mach-o-be -O mach-o-be
_erorr_message=_au_error_message error_msg.o
error_msg2.o
objcopy: error_msg.o: Invalid operation
% objcopy -I mach-o-be -O mach-o-be error_msg.o
error_msg2.o
objcopy: error_msg.o: Invalid operation
objcopy: error_msg2.o: File truncated
% ls -l
total 64
-rw-r--r-- 1 aojc staff 3948 Oct 22 15:30
error_msg.o
-rw-r--r-- 1 aojc staff 84 Oct 22 15:53
error_msg2.o
% objdump -t error_msg2.o
objdump: error_msg2.o: File format not recognized
% objdump --help
<snip>
objdump: supported targets: mach-o-be mach-o-le
mach-o-fat pef pef-xlib sym srec symbolsrec tekhex
binary ihex
objdump: supported architectures: powerpc:common
powerpc:common64 powerpc:603 powerpc:EC603e
powerpc:604 powerpc:403 powerpc:601 powerpc:620
powerpc:630 powerpc:a35 power
pc:rs64ii powerpc:rs64iii powerpc:7400 powerpc:e500
powerpc:MPC8XX powerpc:970 rs6000:6000 rs600
0:rs1 rs6000:rsc rs6000:rs2 i386 i386:x86-64 i8086
i386:x86-64:intel i386:intel
Any suggestions on how to resolve this problem?
Thanks!
James
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com