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]
Other format: [Raw text]

Re: Problems compiling elfxx-sparc.c


"David S. Miller" <davem@davemloft.net> writes:

> On Thu, 21 Apr 2005 00:38:21 +0200
> Andreas Schwab <schwab@suse.de> wrote:
>
>> > +      ret->dynamic_interpreter =
>> > +	(const unsigned char *) ELF64_DYNAMIC_INTERPRETER;
>> 
>> Wouldn't it be better to change the type of dynamic_interpreter instead?
>> The only other use of it has to cast it anyway.
>
> Feel free to commit such a change, I have no objections.

Thanks, I've checked in this patch, tested with a cross build with
--enable-targets="sparc-suse-linux sparc64-suse-linux".

Andreas.

2005-04-21  Andreas Schwab  <schwab@suse.de>

	* elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
	unsigned from type of dynamic_interpreter.
	* elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
	casts again.

Index: elfxx-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-sparc.c,v
retrieving revision 1.2
diff -u -a -p -r1.2 elfxx-sparc.c
--- elfxx-sparc.c	20 Apr 2005 18:39:26 -0000	1.2
+++ elfxx-sparc.c	21 Apr 2005 12:16:04 -0000
@@ -778,8 +778,7 @@ _bfd_sparc_elf_link_hash_table_create (b
       ret->align_power_max = 4;
       ret->bytes_per_word = 8;
       ret->bytes_per_rela = sizeof (Elf64_External_Rela);
-      ret->dynamic_interpreter =
-	(const unsigned char *) ELF64_DYNAMIC_INTERPRETER;
+      ret->dynamic_interpreter = ELF64_DYNAMIC_INTERPRETER;
       ret->dynamic_interpreter_size = sizeof ELF64_DYNAMIC_INTERPRETER;
     }
   else
@@ -796,8 +795,7 @@ _bfd_sparc_elf_link_hash_table_create (b
       ret->align_power_max = 3;
       ret->bytes_per_word = 4;
       ret->bytes_per_rela = sizeof (Elf32_External_Rela);
-      ret->dynamic_interpreter =
-	(const unsigned char *) ELF32_DYNAMIC_INTERPRETER;
+      ret->dynamic_interpreter = ELF32_DYNAMIC_INTERPRETER;
       ret->dynamic_interpreter_size = sizeof ELF32_DYNAMIC_INTERPRETER;
     }
 
Index: elfxx-sparc.h
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-sparc.h,v
retrieving revision 1.1
diff -u -a -p -r1.1 elfxx-sparc.h
--- elfxx-sparc.h	19 Apr 2005 21:26:30 -0000	1.1
+++ elfxx-sparc.h	21 Apr 2005 12:16:04 -0000
@@ -66,7 +66,7 @@ struct _bfd_sparc_elf_link_hash_table
   bfd_vma (*r_info) (Elf_Internal_Rela *, bfd_vma, bfd_vma);
   bfd_vma (*r_symndx) (bfd_vma);
   int (*build_plt_entry) (bfd *, asection *, bfd_vma, bfd_vma, bfd_vma *);
-  const unsigned char *dynamic_interpreter;
+  const char *dynamic_interpreter;
   int dynamic_interpreter_size;
   unsigned int word_align_power;
   unsigned int align_power_max;

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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