aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-07-10 18:07:17 +0000
committerIan Lance Taylor <ian@airs.com>1995-07-10 18:07:17 +0000
commite336470145cab9956a5e780edcc85f2471aadc36 (patch)
treed9c6b8b801d0d967ba8cb6685acc41c529d412e0 /bfd
parent84144a8f5669979504bfacc30bd6fd778c17dd73 (diff)
downloadgdb-e336470145cab9956a5e780edcc85f2471aadc36.zip
gdb-e336470145cab9956a5e780edcc85f2471aadc36.tar.gz
gdb-e336470145cab9956a5e780edcc85f2471aadc36.tar.bz2
* aoutx.h (NAME(aout,link_hash_table_create)): Allocate hash table
using bfd_alloc, not malloc. * cofflink.c (_bfd_coff_link_hash_table_create): Likewise. * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise. * i386linux.c (linux_link_hash_table_create): Likewise. * linker.c (_bfd_generic_link_hash_table_create): Likewise. * sunos.c (sunos_link_hash_table_create): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/cofflink.c2
-rw-r--r--bfd/linker.c12
3 files changed, 15 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e006596..c98c08d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -5,6 +5,14 @@ Mon Jul 10 11:45:55 1995 Ken Raeburn <raeburn@cygnus.com>
Mon Jul 10 11:09:58 1995 Ian Lance Taylor <ian@cygnus.com>
+ * aoutx.h (NAME(aout,link_hash_table_create)): Allocate hash table
+ using bfd_alloc, not malloc.
+ * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
+ * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
+ * i386linux.c (linux_link_hash_table_create): Likewise.
+ * linker.c (_bfd_generic_link_hash_table_create): Likewise.
+ * sunos.c (sunos_link_hash_table_create): Likewise.
+
Based on patches from Eric Youngdale <eric@aib.com>:
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): If -Bsymbolic,
output a DT_SYMBOLIC dynamic entry.
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index efc8305..362a718 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -190,7 +190,7 @@ _bfd_coff_link_hash_table_create (abfd)
struct coff_link_hash_table *ret;
ret = ((struct coff_link_hash_table *)
- malloc (sizeof (struct coff_link_hash_table)));
+ bfd_alloc (abfd, sizeof (struct coff_link_hash_table)));
if (ret == NULL)
{
bfd_set_error (bfd_error_no_memory);
diff --git a/bfd/linker.c b/bfd/linker.c
index 5aae545..ef9469b 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -597,12 +597,12 @@ _bfd_generic_link_hash_table_create (abfd)
struct generic_link_hash_table *ret;
ret = ((struct generic_link_hash_table *)
- malloc (sizeof (struct generic_link_hash_table)));
- if (!ret)
- {
- bfd_set_error (bfd_error_no_memory);
- return (struct bfd_link_hash_table *) NULL;
- }
+ bfd_alloc (abfd, sizeof (struct generic_link_hash_table)));
+ if (ret == NULL)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return (struct bfd_link_hash_table *) NULL;
+ }
if (! _bfd_link_hash_table_init (&ret->root, abfd,
generic_link_hash_newfunc))
{