* ld/testsuite/ld-arm/group-relocs.s: Mark code sections as executable.
[binutils-gdb.git] / ld / ldctor.c
index 28e5ddb1f0b5ad5c4ea9e1494791b3e1d42b3d43..c4fd9e8f720fe65d543ea676ad89474d7aee67fd 100644 (file)
@@ -1,6 +1,6 @@
 /* ldctor.c -- constructor support routines
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2006, 2007, 2008, 2009
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
    By Steve Chamberlain <sac@cygnus.com>
 
@@ -70,7 +70,7 @@ ldctor_add_set_entry (struct bfd_link_hash_entry *h,
 
   if (p == NULL)
     {
-      p = xmalloc (sizeof (struct set_info));
+      p = (struct set_info *) xmalloc (sizeof (struct set_info));
       p->next = sets;
       sets = p;
       p->h = h;
@@ -106,7 +106,7 @@ ldctor_add_set_entry (struct bfd_link_hash_entry *h,
        }
     }
 
-  e = xmalloc (sizeof (struct set_element));
+  e = (struct set_element *) xmalloc (sizeof (struct set_element));
   e->next = NULL;
   e->name = name;
   e->section = section;
@@ -153,8 +153,10 @@ ctor_prio (const char *name)
 static int
 ctor_cmp (const void *p1, const void *p2)
 {
-  const struct set_element * const *pe1 = p1;
-  const struct set_element * const *pe2 = p2;
+  const struct set_element * const *pe1 =
+      (const struct set_element * const *) p1;
+  const struct set_element * const *pe2 =
+      (const struct set_element * const *) p2;
   const char *n1;
   const char *n2;
   int prio1;
@@ -223,7 +225,7 @@ ldctor_build_sets (void)
          for (e = p->elements; e != NULL; e = e->next)
            ++c;
 
-         array = xmalloc (c * sizeof *array);
+         array = (struct set_element **) xmalloc (c * sizeof *array);
 
          i = 0;
          for (e = p->elements; e != NULL; e = e->next)