This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Error: Flag --keep-global-symbol doesnt work ??
- From: Heiko_Elger at arburg dot com
- To: binutils at sources dot redhat dot com
- Date: Tue, 15 Oct 2002 17:57:44 +0200
- Subject: Error: Flag --keep-global-symbol doesnt work ??
Hello,
I want to use the -G (--keep-global-symbol, --keep-global-symbols) and I think
it doens work.
I tried with version 2.12.90 (cygwin version).
---- snip: test.c --------------
int global_i;
int f_global(void)
{
return 1;
}
--------end nip -------------
gcc -g -O0 -c test.c -o test.o
nm test.o
00000000 b .bss
00000000 d .data
00000000 N .stab
00000000 N .stabstr
00000000 t .text
00000000 t ___gnu_compiled_c
00000000 T _f_global
00000010 C _global_i
00000000 t gcc2_compiled.
the commands: objcopy -G _f_global -G _global_i test.o test.new.o
nm test.new.o
have the same output as with test.o.
00000000 b .bss
00000000 d .data
00000000 N .stab
00000000 N .stabstr
00000000 t .text
00000000 t ___gnu_compiled_c
00000000 T _f_global
00000010 C _global_i
00000000 t gcc2_compiled.
Perhaps its a problem of nm.
I tried to link test.o with another object which have references to f_global and
global_i with no errors.
So I think that it will not work!
Can you please give me a hint?
Mit freundlichen Gruessen
best regards
Heiko Elger
********************
ARBURG GmbH + Co
Heiko Elger
- Softwareentwicklung - / - Research and Development -
Arthur-Hehl-Strasse
D-72290 Lossburg
Tel.: +49 (0) 7446 33-3659
Fax.: +49 (0) 7446 33-3365
mailto:heiko_elger@arburg.com
http://www.arburg.com