Hi,

I'm trying to rename symbols in an archive using objcopy. It works
perfectly under Linux, but on Mac OS X, using binutils 2.16.1 (from
MacPorts) or 2.17 (from source), doesn't work. For example:

sinope:~ as49$ cat blah.c
int foo(int f) {
 int x;
 x=2*f;
 return x;
}

sinope:~ as49$ gcc -c blah.c -o blah.o
sinope:~ as49$ ar cru blah.a blah.o 
sinope:~ as49$ nm blah.a 

blah.a(blah.o):
00000000 T _foo

sinope:~ as49$ gobjdump -a blah.o

blah.o:     file format mach-o-le
blah.o

sinope:~ as49$ gobjdump -a blah.a
gobjdump: blah.a: File format not recognized

Here, gobjdump is version 2.16.1 from MacPorts, but 2.17 gives the same
error message. Note that ar and nm are from Apple and not GNU.
I tried to build objdump from source using

./configure --enable-64-bit-bfd --enable-targets=all

but I get an error message that the the object files are ambiguous with
respect to their format.

My machine is running Mac OS X 10.4.8 (8N1051)/Darwin 8.8.2, it is a
MacBookPro2,2 with an Intel Core 2 Duo which I assume uses a 32 bit ABI,
so I shouldn't even need the 64-bit versions. As far as I know, all
files I'm operating on are flat files.

Is this a bug or simply a lacking feature?

Any help appreciated,
Axel.




_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to