This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
misc small fixes
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Wed, 22 Nov 2006 14:01:14 +1030
- Subject: misc small fixes
bfd/
* pef.c (bfd_pef_make_empty_symbol): Delete function. Define instead.
* xsym.c (bfd_sym_make_empty_symbol): Likewise.
* xsym.h (bfd_sym_make_empty_symbol): Delete.
gas/
* config/obj-elf.c (obj_elf_version): Use memcpy rather than strcpy.
Index: bfd/pef.c
===================================================================
RCS file: /cvs/src/src/bfd/pef.c,v
retrieving revision 1.19
diff -u -p -r1.19 pef.c
--- bfd/pef.c 16 Sep 2006 18:12:14 -0000 1.19
+++ bfd/pef.c 20 Nov 2006 02:18:50 -0000
@@ -987,11 +987,7 @@ bfd_pef_canonicalize_symtab (bfd *abfd,
return ret;
}
-static asymbol *
-bfd_pef_make_empty_symbol (bfd *abfd)
-{
- return bfd_alloc (abfd, sizeof (asymbol));
-}
+#define bfd_pef_make_empty_symbol _bfd_generic_make_empty_symbol
static void
bfd_pef_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED,
Index: bfd/xsym.c
===================================================================
RCS file: /cvs/src/src/bfd/xsym.c,v
retrieving revision 1.18
diff -u -p -r1.18 xsym.c
--- bfd/xsym.c 19 Jun 2006 13:17:43 -0000 1.18
+++ bfd/xsym.c 20 Nov 2006 02:18:52 -0000
@@ -2275,11 +2275,7 @@ bfd_sym_object_p (bfd *abfd)
return NULL;
}
-asymbol *
-bfd_sym_make_empty_symbol (bfd *abfd)
-{
- return bfd_alloc (abfd, sizeof (asymbol));
-}
+#define bfd_sym_make_empty_symbol _bfd_generic_make_empty_symbol
void
bfd_sym_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED, asymbol *symbol, symbol_info *ret)
Index: bfd/xsym.h
===================================================================
RCS file: /cvs/src/src/bfd/xsym.h,v
retrieving revision 1.10
diff -u -p -r1.10 xsym.h
--- bfd/xsym.h 19 Jun 2006 13:17:43 -0000 1.10
+++ bfd/xsym.h 20 Nov 2006 02:18:53 -0000
@@ -687,8 +687,6 @@ extern int bfd_sym_scan
(bfd *, bfd_sym_version, bfd_sym_data_struct *);
extern const bfd_target * bfd_sym_object_p
(bfd *);
-extern asymbol * bfd_sym_make_empty_symbol
- (bfd *);
extern void bfd_sym_get_symbol_info
(bfd *, asymbol *, symbol_info *);
extern long bfd_sym_get_symtab_upper_bound
Index: gas/config/obj-elf.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-elf.c,v
retrieving revision 1.98
diff -u -p -r1.98 obj-elf.c
--- gas/config/obj-elf.c 10 Nov 2006 07:47:14 -0000 1.98
+++ gas/config/obj-elf.c 20 Nov 2006 02:18:58 -0000
@@ -1456,7 +1456,7 @@ obj_elf_version (int ignore ATTRIBUTE_UN
p = frag_more (sizeof (e_note.type));
md_number_to_chars (p, i_note.type, sizeof (e_note.type));
p = frag_more (len);
- strcpy (p, name);
+ memcpy (p, name, len);
frag_align (2, 0, 0);
--
Alan Modra
IBM OzLabs - Linux Technology Centre