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]

PATCH: Fix typo in elf32-arm.c


Dan Jacobowitz says that I have introduced a warning in elf32-arm.c,
at least when being compiled with newer compilers, due to an incorrect
declaration of elf32_arm_symbian_begin_write_processing.  (I declared
it to take a bfd_boolean as its second parameter, even though that it
is clearly incorrect.)  While fixing that, I also eliminated the K&R
declarations I had introduced, now that I understand that binutils is
OK with ANSI declarations.

I took the liberty of checking in this patch.  Was that inappropriate?
In GCC, this check-in would be OK under the "obvious" rule, but I'm
not sure what the binutils rules are.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2004-11-09  Mark Mitchell  <mark@codesourcery.com>

	* elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
	declaration.
	(elf32_arm_symbian_modify_segment_map): Likewise.

Index: elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.4
diff -c -5 -p -r1.4 elf32-arm.c
*** elf32-arm.c	9 Nov 2004 16:44:31 -0000	1.4
--- elf32-arm.c	9 Nov 2004 16:47:59 -0000
*************** static struct bfd_elf_special_section co
*** 5622,5642 ****
    { ".got",            4,  0, SHT_PROGBITS, 0 },
    { ".hash",           5,  0, SHT_HASH,     0 },
    { NULL,              0,  0, 0,            0 }
  };
  
- static bfd_boolean
- elf32_arm_symbian_modify_segment_map
-   PARAMS ((bfd *, struct bfd_link_info *));
- static void
- elf32_arm_symbian_begin_write_processing
-   PARAMS ((bfd *, bfd_boolean));
- 
  static void
! elf32_arm_symbian_begin_write_processing (abfd, linker)
!      bfd *abfd;
!      bfd_boolean linker;
  {
    /* BPABI objects are never loaded directly by an OS kernel; they are
       processed by a postlinker first, into an OS-specific format.  If
       the D_PAGED bit is set on the file, BFD will align segments on
       page boundaries, so that an OS can directly map the file.  With
--- 5622,5635 ----
    { ".got",            4,  0, SHT_PROGBITS, 0 },
    { ".hash",           5,  0, SHT_HASH,     0 },
    { NULL,              0,  0, 0,            0 }
  };
  
  static void
! elf32_arm_symbian_begin_write_processing (bfd *abfd, 
! 					  struct bfd_link_info *link_info
! 					    ATTRIBUTE_UNUSED)
  {
    /* BPABI objects are never loaded directly by an OS kernel; they are
       processed by a postlinker first, into an OS-specific format.  If
       the D_PAGED bit is set on the file, BFD will align segments on
       page boundaries, so that an OS can directly map the file.  With
*************** elf32_arm_symbian_begin_write_processing
*** 5646,5658 ****
       loadable segment.  */
    abfd->flags &= ~D_PAGED;
  }
  
  static bfd_boolean
! elf32_arm_symbian_modify_segment_map (abfd, info)
!      bfd *abfd;
!      struct bfd_link_info *info ATTRIBUTE_UNUSED;
  {
    struct elf_segment_map *m;
    asection *dynsec;
  
    /* BPABI shared libraries and executables should have a PT_DYNAMIC
--- 5639,5651 ----
       loadable segment.  */
    abfd->flags &= ~D_PAGED;
  }
  
  static bfd_boolean
! elf32_arm_symbian_modify_segment_map (bfd *abfd, 
! 				      struct bfd_link_info *info 
! 				        ATTRIBUTE_UNUSED)
  {
    struct elf_segment_map *m;
    asection *dynsec;
  
    /* BPABI shared libraries and executables should have a PT_DYNAMIC


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