This is the mail archive of the binutils@sourceware.org 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: ld memory deallocation


On Tue, Feb 12, 2013 at 08:36:36AM +1030, Alan Modra wrote:
> 	* elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Default to
> 	_bfd_elf_link_hash_table_free.

That particulary change broke arc-elf, d30v-elf, dlx-elf, i960-elf,
or32-elf, and pj-elf, the ELF targets that use the generic linker.

	* elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Provide
	suitable definition when using generic linker hash table.

Index: bfd/elfxx-target.h
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-target.h,v
retrieving revision 1.131
diff -u -p -r1.131 elfxx-target.h
--- bfd/elfxx-target.h	11 Feb 2013 05:30:53 -0000	1.131
+++ bfd/elfxx-target.h	11 Feb 2013 21:52:38 -0000
@@ -232,14 +232,13 @@
   _bfd_elf_canonicalize_dynamic_reloc
 #endif
 
-#ifndef bfd_elfNN_bfd_link_hash_table_free
-#define bfd_elfNN_bfd_link_hash_table_free _bfd_elf_link_hash_table_free
-#endif
-
 #ifdef elf_backend_relocate_section
 #ifndef bfd_elfNN_bfd_link_hash_table_create
 #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create
 #endif
+#ifndef bfd_elfNN_bfd_link_hash_table_free
+#define bfd_elfNN_bfd_link_hash_table_free _bfd_elf_link_hash_table_free
+#endif
 #ifndef bfd_elfNN_bfd_link_add_symbols
 #define bfd_elfNN_bfd_link_add_symbols	bfd_elf_link_add_symbols
 #endif
@@ -256,6 +255,9 @@
 #define bfd_elfNN_bfd_link_hash_table_create \
   _bfd_generic_link_hash_table_create
 #endif
+#ifndef bfd_elfNN_bfd_link_hash_table_free
+#define bfd_elfNN_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
+#endif
 #ifndef bfd_elfNN_bfd_link_add_symbols
 #define bfd_elfNN_bfd_link_add_symbols	_bfd_generic_link_add_symbols
 #endif

-- 
Alan Modra
Australia Development Lab, IBM


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