This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with objcopy for M68K... (fwd)


On Wed, Jul 12, 2000 at 04:13:44PM +0400, Artemy Ivanov wrote:
> 
> 
> Sorry dear H.J. Lu... Maybe you could answer on my question
> 
> 
> 
> 
> ---------- Forwarded message ----------
> Date: Tue, 11 Jul 2000 16:57:34 +0400 (MSD)
> From: Artemy Ivanov <ivan_a@mail.oktet.ru>
> To: bug-gnu-utils@gnu.org
> Subject: Problem with objcopy for M68K...
> 
> Dear GNU people!
> 
> I'm so sorry, but I have a serious problem with 
> objcopy for M68k architecture...
> 
> Well I've built binutils with the following options:
> 
> BINUTILS_VERSION=binutils-2.10
> cd build-binutils.m68k
> ../../src/$BINUTILS_VERSION/configure --target=m68k-wrs-vxworks \
>                                    --prefix=${WIND_BASE}/host/x86-linux \
>                                    --program-prefix="" \
>                                    --program-suffix="68k"
> 
> make
> 
> And made the following test:
> 
> C-source file - a.c:
> ****************************
> #include <stdio.h>
> 
> void test(void)
> {    
> }
> ****************************
> -----------------------------------------------------
> $gcc68k a.c -o a.o
> $nm68k a.o
> 00000000 t00000000 t /tmp/cckRAxxy.o
> 00000000 t ___gnu_compiled_c
> 00000000 T _test
> 00000000 t gcc2_compiled.
> 
> $objcopy68k -L _test a.o
> $nm68k a.o
> 00000000 t /tmp/cckRAxxy.o
> 00000000 t ___gnu_compiled_c
> 00000000 T _test
> 00000000 t gcc2_compiled.
> $
> 
> ------------------------------------------------------
> As you see I couldn't make type of 'test' symbol from Global(external)
> to local....
> Though with PowerPc gccppc, objcopyppc, nmppc I could change symbol type
> from extern to local :
> 
> $gccppc a.c -o a.o
> $nmppc a.o
> 00000000 t gcc2_compiled.
> 00000000 T test
> 
> $objcopyppc -L test a.o
> $nmppc a.o
> 00000000 t gcc2_compiled.
> 00000000 t test
> $
> 
> Please Help me to understand....- 
> Is it bug in binutils, or no....
> 
> Thanks.
> 

Can I check in this patch?

Thanks.


H.J.
---
2000-07-13  H.J. Lu  <hjl@gnu.org>

	* aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.

Index: aoutx.h
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/aoutx.h,v
retrieving revision 1.4
diff -u -p -r1.4 aoutx.h
--- aoutx.h	2000/05/30 19:34:26	1.4
+++ aoutx.h	2000/07/13 17:36:06
@@ -1681,6 +1681,8 @@ translate_to_native_sym_flags (abfd, cac
     sym_pointer->e_type[0] = ((aout_symbol_type *) cache_ptr)->type;
   else if ((cache_ptr->flags & BSF_GLOBAL) != 0)
     sym_pointer->e_type[0] |= N_EXT;
+  else if ((cache_ptr->flags & BSF_LOCAL) != 0)
+    sym_pointer->e_type[0] &= ~N_EXT;
 
   if ((cache_ptr->flags & BSF_CONSTRUCTOR) != 0)
     {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]